Re: Glib::filename_to_unicode bug?
- From: Dave Hayes <dave jetcafe org>
- To: Tadej BorovÅak <tadeboro gmail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: Glib::filename_to_unicode bug?
- Date: Thu, 15 Apr 2010 14:25:55 -0700
<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?
Hmm, looks like perl doesn't care about encoding and succeeds opening
that file simply because bytes stored in $foo match those on disk.
Correct. I was hoping GLib behaved that way too, which might be naive of
me but certainly would obey the principle of least surprise. :)
As for the solution, I'm not entirely sure how to solve this. Renaming
file to filenames that have only characters with codes < 128 might do
the trick.
Well I'd say that would be impolite of an application to rename a user's
file out from under them, especially because the library you are using
can't handle the name. Is there any way to tell Glib to use just bytes
for the filename?
--
Dave Hayes - Consultant - Altadena CA, USA - dave jetcafe org
The opinions expressed above are entirely my own <<<
By and large, language is a tool for concealing the truth.
-George Carlin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]