On Sun, Feb 20, 2022 at 07:34:49PM +0100, Patrice Dumas wrote:
> > So my best idea at the moment for fixing the encoding of the error messages 
> > is:
> > * When calling gettext and related functions, always demand UTF-8, and 
> > convert
> > this back into Perl's internal coding afterwards.
> 
> Why demand utf-8, any encoding should be ok?

I'd thought utf-8 would be trivially convertable to the internal perl encoding.

> > * Convert the messages at the time they are output.
> > 
> > For example, if a node name is in EUC-JP, this would be converted 
> > (internally)
> > into UTF-8 when the file is read.  
> 
> Why not converted to the internal perl encoding?

This is what I had meant.  The result of gettext should be Perl character
strings, not sequences of bytes.  I think your idea of a filter on the output
is a good one.

Reply via email to