[PerlChina] XML中文

Fayland Lam fayland at gmail.com
Tue Aug 12 23:57:51 PDT 2008


Question wrote:
> 各位不吝赐教啊,难道真要自己搞regexp?
> DOM不支持中文。。。这个匪夷所思啊。
>

binmode STDOUT 是不中的,要去把原始的 $file 转为 utf8
否则得用 Encode 来转为 utf8

> 2008/8/13 Question <wanliyou at gmail.com <mailto:wanliyou at gmail.com>>
>
>     现在用这个
>     use XML::Simple;
>     my $xs1 = new XML::Simple;
>
>     my $doc = $xs1->XMLin($file);
>
>     读入是正常的,但中文print出来就不对了,binmode(STDOUT, ":utf8")
>     更不行。。。
>
>
>     -- 
>     >: ~
>
>
>
>
> -- 
> >: ~
> ------------------------------------------------------------------------
>
> _______________________________________________
> China-pm mailing list
> China-pm at pm.org
> http://mail.pm.org/mailman/listinfo/china-pm


-- 
Fayland Lam // http://www.fayland.org/ 
Foorum based on Catalyst // http://www.foorumbbs.com/ 



More information about the China-pm mailing list