Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Convert \u characters into utf8by ultranerds (Hermit) |
on Feb 02, 2016 at 13:00 UTC ( [id://1154260]=perlquestion: print w/replies, xml ) | Need Help?? |
ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I had a similar question a while back - when trying to convert NORMAL (latin) characters into their correct values: http://perlmonks.org/?node_id=1148915 I'm now got a similar issue, but this time I need to deal with UTF8. Basically, I have a JSON file that I'm downloading, and it has the content like: R\u00f6hrenstick Farbt\u00f6ne ihre Sch\u00f6nheit \u00fcberThe file itself is in ANSI (not UTF8 format) I naively believe it would be as simple as passing it into $file = Encode::encode('UTF-8',$file); Could anyone please point me in the right direction? :) Thanks! Andy
Back to
Seekers of Perl Wisdom
|
|