drewmate has asked for the wisdom of the Perl Monks concerning the following question:
$entry[5] = Unicode::Escape::escape($val);
This seemed to work for Latin languages with accents, and Russian (Cyrillic characters) but when I tested it with Japanese characters it gave me the error:
Cannot decode string with wide characters at C:/Perl/lib/Encode.pm line 194.I'm not sure why I am getting this error, since I'm not trying to decode anything. I'm trying to escape some Japanese characters into escaped Unicode code points. I think the problem might be because the Escape routine is expecting UTF8 and the Japanese is in UTF16 or something. I'm not entirely sure... The text comes from an excel document which I open with Spreadsheet::Read, and I'm not sure what that is doing with it.
Anyone have any tips on how to figure this one out?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cannot decode string with wide charactersCannot decode string with wide characters - I'm not decoding!
by graff (Chancellor) on May 04, 2011 at 03:11 UTC | |
|
Re: Cannot decode string with wide charactersCannot decode string with wide characters - I'm not decoding!
by 7stud (Deacon) on May 04, 2011 at 00:55 UTC | |
by choroba (Cardinal) on May 04, 2011 at 12:11 UTC | |
by 7stud (Deacon) on May 05, 2011 at 00:47 UTC | |
by ikegami (Patriarch) on May 05, 2011 at 06:51 UTC | |
|
Re: Cannot decode string with wide charactersCannot decode string with wide characters - I'm not decoding!
by Anonymous Monk on May 04, 2011 at 00:27 UTC |