Re: glade localization woes



Jan Hudec <bulb ucw cz> writes:

It seems that there is a bug in gettext. Perl has two types of
strings -- octet streams and unicode. It's a mess, sometimes. Read
the perlunicode manpage to find more about it. Now what really
should be done is forcing gettext to mark the string as unicode one
if it is one.

Is it anything I'm doing wrong, or is it a Perl Glade bug (which
is what I'm inclined to believe)?

No. It's a gettext bug. It returns unicode string, but does not mark
it as such. And all the glib-perl/gtk2-perl/gtk2-glade-perl stuff
honors that marks.

gettext hasn't to tag a perl string as utf8 since it's not aware of
perl internals and you cannot expect it from doing so.

you need to call "some_module::bind_textdomain_codeset("mydomain",
'UTF8');" in order to get utf8 strings

with this functions defined in a xs as:

==================================================>
char *                                           >
bind_textdomain_codeset(domainname, codeset)     >
   char * domainname                             >
   char * codeset                                >
==================================================>

and then you've to tag strings as utf8

see N() implementation in common.pm from drakx installer and tools:

Attachment: common.pm
Description: Text document



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