Re: Glib::filename_to_unicode bug?



Brian Manning <elspicyjack gmail com> writes:
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.

What happens if the file name is not proper utf-8 but can be accessed
by an open() call despite this? 

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?  

In my example, from a UNIX command line pattern match. 
-- 
Dave Hayes - Consultant - Altadena CA, USA - dave jetcafe org 
The opinions expressed above are entirely my own <<<

A recruit was asked by a training instructor, "Give me an
example of how to fool the enemy."

The recruit answered, "When you are out of ammunition, don't
let the enemy know -- keep on firing!






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