in reply to Re^4: UTF8 with YAML or JSON
in thread UTF8 with YAML or JSON
I should see UTF8 values ... YAML::Syck does this
I don't see this from your example. YAML::Syck returns you two latin1 characters instead of a single \x{103} that the file contains, which is exactly the opposite to what you are saying you want. YAML::XS expects UTF-8 octets on input, and it checks that it is correct UTF-8, and it returns you UTF-8 characters. I have impression that you don't realise what you are getting from the modules, maybe you should use Dump from the Devel::Peek to inspect values instead of Dumper, also if you add
to your script, it will be clear to you, that YAML::Syck doesn't return ă, but ă.use open ":utf8"; use open ":std";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: UTF8 with YAML or JSON
by SBECK (Chaplain) on Jul 02, 2012 at 13:07 UTC |