jasom / nyaml

A lisp native YAML parser
MIT License
25 stars 8 forks source link

Opening the in.json test ffile with external-format :utf-8 #5

Closed Yehouda closed 2 years ago

Yehouda commented 2 years ago

https://github.com/jasom/nyaml/blob/4bd950e8839710af50ffe38a750edc85e406c05e/test/yaml-test-suite.lisp#L19

The in.json file are apparently utf-8 format, but that is not necessarily what with-open-file uses (it is not specified in the standard). LispWorks uses :latin-1, and therefore the tests fail on some of files (test/yaml-test-suite-data/yaml-test-suite-data-2020-08-01/G4RS/in.json and test/yaml-test-suite-data/yaml-test-suite-data-2020-08-01/H3Z8/in.json).

changing the line above to (uiop/stream:with-input-file (f ,json) because uiop-stream (part of asdf) defaults to utf-8.

https://common-lisp.net/project/asdf/uiop.html