Re: Glib::filename_to_unicode bug?
- From: Brian Manning <elspicyjack gmail com>
- To: Dave Hayes <dave jetcafe org>
- Cc: gtk-perl-list gnome org
- Subject: Re: Glib::filename_to_unicode bug?
- Date: Thu, 15 Apr 2010 18:27:50 -0700
On Thu, Apr 15, 2010 at 2:25 PM, Dave Hayes <dave jetcafe org> wrote:
<tadeboro gmail com> writes:
This is important, since GLib on Windows always uses UTF-8 for
filenames, no matter how those names are encoded on disk. On other
platforms, filenames are returned in encoding, specified by current
locale.
That's curious. Doesn't that make it harder to write portable
applications in Glib?
I'd say it's the opposite, you know now that Glib always wants UTF-8,
it's up to you to feed it data in the correct character encoding.
Earlier you said that "the file names [you are feeding to Glib] are
from a public archive of files". How are you bringing these file
names into Perl? Reading from a text file on disk, downloading them
over the net using HTTP? Perl by default does not treat data read
from filehandles as being UTF-8 unless you tell it to in your open()
call, or run decode/decode_utf8 (from Encode) on the byte string read
in from the filehandle.
Thanks,
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]