[Israel.pm] Hebrew to UTF-8, completely out of ideas!

Moshe Kaminsky kaminsky at math.huji.ac.il
Fri Oct 22 13:17:32 PDT 2004


Hi,

* david istermann <interDist at gmail.com> [22/10/04 22:05]:
> Hi all,
> 
> I'm facing a problem which you may have encountered before and know
> how to solve quickly the issue.
> 
> On Windows 2000 machine:
> I'm getting input by `net file` which describes what shares are open
> right now. Next, i'm building an XML from this data (combined with
> other info from the system) and output it to c:\servstate.xml , which
> should be in Unicode. XML processing is done via XML::Simple.
> The problem arises when there are any files named in Hebrew.
> Apparently, the shell outputs these names as WINDOWS-1255 and so they
> appear as funny symbols in the final XML.
> 
> Neither the technique described by Shlomo Yona, nor playing with any
> possible combination of 'encode' and 'decode' helped. I either get
> ????, or meaningless symbols, or empty squares...
> 
> After reading tons of perl documentation, I have no useful ideas at
> all. What should I do?!

Did you set the mode of the output file to utf8? (as in:
  open FH, '>:utf8', $file
)

Moshe

> 
> Thanks in advance,
> David.
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
> 

-- 
I love deadlines. I like the whooshing sound they make as they fly by. 
                                        -- Douglas Adams
    
    Moshe Kaminsky <kaminsky at math.huji.ac.il>
    Home: 08-9456841

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20041022/730ed5c9/attachment.pgp 


More information about the Perl mailing list