Hi,
> I have a program written for wxPerl which is meant to
display utf8
> strings in a wxTextCtrl control. (The utf8 strings are
read from file)
>
> 1. On Windows, I get illegible garbage.
>
> 2. On Fedora 5 with LANG set to en_US.UTF-8 the results
are fine.
>
> 3. On Fedora 5 with LANG set to C, lines which contain
non-Latin letters
> are not shown.
>
> Does someone have a solution to display utf correctly
on Windows?
Open the file with :utf8 layer.
open my $fh, '<:utf8', "C:myfile";
this should also fix the problems when LANG is set to C.
> And what is the explanation as to why lines containing
non-Latin
> characters do not display at all with LANG set to C?
The reason is: when wxPerl receives a Perl string marked
as
characters, it treats the contents as Unicode; when the
string
is marked as bytes, it interprets it using the currently set
locale.
Regards
Mattia
------------------------------------------------------
Fino al 30% di risparmio + sconto extra del 10%. Scopri
Direct Line con il preventivo gratuito, entro il 31 Ottobre!
http://click.libe
ro.it/direct_line7
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
wxperl-users mailing list
wxperl-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxperl-use
rs
|