pmderodat / ada-toml

TOML parser for Ada
Other
31 stars 5 forks source link

Use Stream_IO for raw byte reading #11

Closed mosteo closed 2 years ago

mosteo commented 2 years ago

I'm not 100% sure this is right, but so you are aware.

There are switches for the compiler and linker (-gnatWx, -Wx) that affect the behavior of Text_IO. With some of those I saw Ada_TOML complain about bad UTF-8 sequences in a file that otherwise was parsed normally (see https://github.com/alire-project/alire/pull/1220).

By using Stream_IO, no translation mechanisms are involved. I've seen similar advice elsewhere to bypass Text_IO for "low level" input/output.

pmderodat commented 2 years ago

This makes sense, so looks good to me, thanks!