Re: auto-upgrading strings to utf8
- From: Quentin <squentin free fr>
- To: Christian Borup <borup borup com>
- Cc: gtk-perl-list gnome org
- Subject: Re: auto-upgrading strings to utf8
- Date: Sun, 05 Jun 2005 15:48:19 +0200
I tried disabling auto-upgrading in Glib, and my program (a very complex
jukebox) runs fine because all the data I use are utf8, so there is no
need to upgrade strings to utf8 in this case.
The problem here is the data not the upgrade.
Maybe I haven't been clear, my program runs fine with or without
auto-upgrading.
Ideally the glib filename functions should be fixed. Quite a few glib
based programs have had problems with filenames, which become utf8 even
though the locale is say iso-8859-15.
I think we should provide a filename helper of some sort. Either as a
function that take a perl string and returns a filename suited for the
locale or perhaps handling the convertion in the the wrappers for the
functions that access the filesystem.
There is already Glib->filename_from_unicode,
The problem here is that gstreamer put a filename in a glib object
property of type string, and all string properties are auto-upgraded to
utf8.
The function called is $source->set(location => $file);
which is a generic glib function to set a property.
(now that I think about it a dirty trick to make it work for now would
be to cheat and turn on the utf8 flag on the non-utf8 filename, so it
doesn't get upgraded.)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]