Hi All,
Thanks for all the help.

Problem was in fact the opposite - double encoding (turned out both
lib::XML and Dancer encode to utf-8...)

I ended up using decode('utf-8') on the data before passing it on, and this
solved the issue (so now I have encode -> decode -> encode chain... which
is why abstractions are evil).

Have a great weekend,
  Ynon


On 11 October 2012 18:49, Meir Guttman <[email protected]> wrote:

> Hey Gaal,****
>
> I would look up Data::Dumper::AutoEncode (
> http://search.cpan.org/~bayashi/Data-Dumper-AutoEncode-0.102/lib/Data/Dumper/AutoEncode.pm).
> You can then use ‘eDumper’ rather than Dumper to actually see letters. This
> package also enables you to use any encoding you want. (The default though
> in utf8.)****
>
> Meir****
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]] *On
> Behalf Of *Gaal Yahas
> *Sent:* יום ה 11 אוקטובר 2012 17:03
> *To:* Perl in Israel
> *Subject:* Re: [Israel.pm] Encoding Question****
>
> ** **
>
> U+05d4 is HEBREW LETTER HE etc. -- your buffer is already in Unicode.****
>
> On Thu, Oct 11, 2012 at 4:51 PM, ynon perek <[email protected]> wrote:**
> **
>
> Hi All,****
>
> ** **
>
> Quick encoding question: I have  a text string that I think is in cp1255,
> because when I print it with Data::Dumper I get:****
>
> ** **
>
> \x{5d4}\x{5e6}\x{5d2}\x{5ea}-\x{5de}\x{5e4}****
>
>
> ****
>
> But, when I try to decode it using:****
>
> ** **
>
> my $decoded = decode('CP1255', $text);****
>
> ** **
>
> I get this error:****
>
> ** **
>
> Wide character in subroutine entry at 
> /Users/ynonperek/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/darwin-2level/Encode.pm
>  line 174, <DATA> line 16.****
>
> Ideas ?****
>
> ** **
>
> -- ****
>
>
> כותב הרצאות ? מדבר מול קהל ? הבלוג שלי לומד 
> לדבר<http://publicspeakr.blogspot.com/> כתוב
> במיוחד בשבילך.****
>
> ** **
>
>
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl****
>
>
>
> ****
>
> ** **
>
> --
> Gaal Yahas <[email protected]>
> http://gaal.livejournal.com/****
>
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>



-- 

כותב הרצאות ? מדבר מול קהל ? הבלוג שלי לומד
לדבר<http://publicspeakr.blogspot.com/>כתוב במיוחד בשבילך.
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to