On Thu, Feb 24, 2022 at 07:40:21PM +0000, Gavin Smith wrote: > > To do something similar to the NonXS parser, one would need, maybe > > in Texinfo/XS/parsetexi/end_line.c in end_line_misc_line around line > > 1428, instead of fullpath = locate_include_file (text); text should be > > converted to the @documentencoding unless it is utf-8 or ascii. > > Done in 46732a3290. I haven't tested this code very much, just by > running the test suite.
To really test, one need a 8 byte locale, or at least files produced from 8 bytes locale, it cannot be tested from the test suite which uses only C.UTF-8. But I do not know if C.UTF-8 is portable, and any 8 byte locale would not be portable, so I don't think that this can be in the test suite ever, and definitely not in the main test suite. Some things I am doing right now to have tests may not be portable, we'll have to see with more testing on other platforms. I tested, it is ok now. > > Yes, I'll add that after if you don't. I think that it will need to be > > obeyed by the XS parser too, in the same way as the @include file names > > should be converted to the documentencoding from utf-8. > > The customization variable could be the name of an encoding to convert > filenames to, or it could be an on/off variable to use the encoding > from the locale. I guess that the latter would be sufficient. > I'm happy if you implement this, although I doubt it is urgent. > It should be off for default on all systems except MS-Windows. I think that it could be both, an on/off variable that sets based on a customization variable based on the locale instead of on documentencoding, but that second customization variable can also be overwritten. > I think it would be fairly simple to implement in the XS parser, if > it is done in the Perl code - it would just need to get the name > of the filename encoding. Agreed.
