Glib::filename_to_unicode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Glib::filename_to_unicode

Fabio Marzocca
I am using Glib::filename_to_unicode() but I found something wrong..

My locale is it_IT, but if the filename contains an euro sign (€) it
is displayed in Nautilus, but my application is not working.

Try this: print Glib::filename_to_unicode('€');

...it doesn't work. This behaviour is not only for the euro sign, but
also for other wide characters.

_______________________________________________
gtk-perl-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Reply | Threaded
Open this post in threaded view
|

Re: Glib::filename_to_unicode

Jan Hudec
On Sun, Jul 03, 2005 at 13:00:37 +0200, The Saltydog wrote:
> I am using Glib::filename_to_unicode() but I found something wrong..
>
> My locale is it_IT, but if the filename contains an euro sign (?) it
> is displayed in Nautilus, but my application is not working.
>
> Try this: print Glib::filename_to_unicode('?');
>
> ...it doesn't work. This behaviour is not only for the euro sign, but
> also for other wide characters.

I can think of two problems, that it might be:

1) G_BROKEN_FILENAMES environment variable. Glib thinks filenames are in
   unicode independent of locale, unless this is set.
2) The string in Perl is already marked as "utf-8", though it is not and
   the conversion is doing something wrong. Are you using
   use utf8;
   or
   use encoding <whatever>;
   ?

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec <[hidden email]>

_______________________________________________
gtk-perl-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Glib::filename_to_unicode

Fabio Marzocca
On 7/3/05, Jan Hudec <[hidden email]> wrote:
>
> 1) G_BROKEN_FILENAMES environment variable. Glib thinks filenames are in
>    unicode independent of locale, unless this is set.
> 2) The string in Perl is already marked as "utf-8", though it is not and
>    the conversion is doing something wrong. Are you using
>    use utf8;
>    or
>    use encoding <whatever>;
>    ?

This is what I am using:

        setlocale(LC_MESSAGES, "");
        textdomain(PACKAGE);    
        bind_textdomain_codeset(PACKAGE,"UTF-8");
_______________________________________________
gtk-perl-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-perl-list