Re: GError location filename as wide chars



Kevin Ryde wrote:
While going through filename bytes versus utf8 in my own program I
noticed this bit of GError which I think is currently concatting utf8
and bytes.

Did you take a look at the filename conversion stuff in Glib (filename_to_unicode, filename_from_unicode) too, by chance? Marc Lehmann says it's totally broken: <https://rt.cpan.org/Public/Bug/Display.html?id=39438>.

I expect anyone with non-ascii in the path to their perl code files is
probably asking for trouble, but I think a filename_display_name() would
at least get it displaying right.

It's a little tricky to test this.  I used the foo.pl below in a
filename with some utf8, run in a utf8 locale.  Without
filename_display_name() the stringized bit gives an extra "A" etc, per
the usual odour of bad utf8 (or bad odour of utf8, as the case may be
:-)

The looks good to me.  muppet?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]