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

Moshe Kaminsky kaminsky at math.huji.ac.il
Sun Oct 24 11:57:10 PDT 2004


* david istermann <interDist at gmail.com> [24/10/04 19:50]:
> Hi,
> 2Moshe: I know about this possibility ('>:utf8'), but I'm outputting
> the stuff via XML::Simple::XMLout.
> 2Shlomi: 
> > XML::Simple is Evil if you ask me.
> Why do you say this? It's really really simple but in this case it
> meets my needs (no usage of attributes, the structure is straight
> forward...)
> Anyway, it looks like my question was not understood. What I need is
> to convert the string ($filepath) to UTF-8 *before* I insert it to the
> hash. If I take already-Unicoded strings they're getting written OK to
> the XML - I guess because XML::Simple uses by default the ':utf8'
> output method.
> Here: 
> $sessions{$user}{OpenShares}[0]{entry}{wide $filepath} = 0;  #
> inserted as keys to avoid duplicates
> # if you ask, after getting all open files into $sessions i do this:
> $sessions{$user}{OpenShares}[0]{entry} = [keys
> $sessions{$user}{OpenShares}[0]{entry}];
> What code should go into "sub wide { ... }" ?

It appears this should have nothing with XML. I don't understand where 
$filepath comes from, but it appears that it is either already in perl 
format, or it came from somewhere in, say, 'cp1255', in which case you 
can have wide to be sub { decode 'cp1255', @_ }.


> 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/20041024/512b09e1/attachment.pgp 

More information about the Perl mailing list