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.
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.