Hello, In the past, I had proposed to always return Info string (from output(), with file name as an empty string, only output in tests) as a character string. See this message and following thread: https://lists.gnu.org/archive/html/bug-texinfo/2024-02/msg00043.html
I have changed my mind, I now think that an Info string returned should always be considered as a binary string, and encoded. I think that a character string representation of Info is not meaningful, because the tags complement a string that is to be considered as a string of bytes, encoded such that the bytes count match. Also there are control characters which a re not classically in strings. (There is also the issue that the tag table is wrong, as noted by Gavin in the above thread, although this could be worked around it is much easier to output a correct string.) So, in commit https://cgit.git.savannah.gnu.org/cgit/texinfo.git/commit/?id=1d9d4c78663e18ab4ae2a613aa80f8176db3c9f0 I changed that. For the test output that goes to a .pl file, I decided to protect all the non-ascii characters in the string by \x** and generate a double quoted string. That way the string can be converted to UTF-8 like the other strings without problem. The drawback is that the files diff are less readable. A possible workaround would be to use output files systematically for info. As a side note, this is also more or less needed to have a C implementation that give the same output as Perl without being cumbersome, but, although that is what made me rethink about the issue, I think that it is a good thing in itself to have Info as byte strings only independentrly of the C vs Perl output. -- Pat
