Re: Localization and accented chars



I have found that all my problems are related to strings saved into an array:

my @MESSAGE = (_("string1"),
        _("string2"),
        _("string3"),
        _("string4"),
        _("string5")
       );

when I try to display $MESSAGE[n] I am getting the scrambled text...
Is something related to arrays? Should I remove all the text from the
array and embed it in the code?


On 5/27/05, The Saltydog <thesaltydog gmail com> wrote:
If I remove that line and leave utf-8, I don't see the chars on my
system. In any case, I am speaking of localizations like italia,
german, dutch and french, and they all are in the iso-8859-1 area...



On 5/27/05, Boštjan Špetič <igzebedze auch eu org> wrote:
I have localized my Gtk2 app in this way:

********************
use Locale::gettext;
use POSIX qw(setlocale);
use Encode qw(decode);

sub _ {return decode("iso-8859-1",dgettext( PACKAGE,$_[0]));}
setlocale(LC_MESSAGES, "");
textdomain(PACKAGE);

i think the problem is in the decode('iso...') function - you really cannot predict what encoding the 
users will use - it might aswell be utf8...

$string = _("Generic message");
********************************
It works fine, but users reports problems with accented language in
french and with Umlats in german. I have tested them on my system
(italian locale) and they work fine.
What else can I do?

regards, bostjan

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list




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