Perhaps this will help.
Putting list into wxlistbox. You can see
the print statement that produces
'Well ==>   HENW_Letebrønner'
when executed with 'perl -C'

$count=0;
foreach ( @{$this->{list}}) {
        if ($_ =~ /^HENW_Lete/) {
                print "Well ==>  $_\n";
        }
        $this->{listbox}->Insert($_,$count);
        $count++;
}




On 8/4/2010 8:16 AM, Mattia Barbon wrote:
perltk wrote:
I have an app that is reading from a database. Some of the names
include unicode characters:

Heres are some print statement output when running app:

>   perl  uwi_flip.pl
    Well ==>  HENW_Letebr?nner

>    perl -C uwi_flip.pl
    Well ==>  HENW_Letebrønner

Any names with these characters in them do not display in widgets - they are blank.
No errors, just blank.  The wxwidgets .so should be unicode.

  Yes, they are.

What am I missing ?????

Are you sure that the strings you read from the database have the Unicode flag set when read from the database? You can use the Dump() function from Devel::Peek to check if the scalar has the Unicode bit set.

If the Unicode bit is not set on the scalar, the conversion from Perl scalar to wxString should use the encoding of your current locale, but I can't remember if if uses the system locale or (more likely) the locale set with wxLocale.

HTH,
Mattia


Reply via email to