2008年8月12日星期二

Re: [PerlChina] XML中文

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

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

> 2008/8/13 Question <wanliyou@gmail.com <mailto:wanliyou@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@pm.org
> http://mail.pm.org/mailman/listinfo/china-pm


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

_______________________________________________
China-pm mailing list
China-pm@pm.org
http://mail.pm.org/mailman/listinfo/china-pm

没有评论: