The 'use utf8' pragma is actually included in my module (though I omitted it from the simple code I posted here). However, I've played with it quite a bit and never got the results I wanted either.
In the code posted here, the variable $in DOES contain UTF8 characters, but when you pass it to Load (which is obviously outside the scope of anything in this script) it gets converted. For that reason, though technically correct, I don't think that adding the pragma here will have any impact. If I'm wrong though, I'm certainly open to correction. I"m definitely not a UTF8 expert.
| [reply] |
| [reply] [d/l] [select] |
I want the characters included in the data structure to be EXACTLY what I included in the text that got parsed. So, if I send in a string which contains a scalar of UTF8 values, then I should see UTF8 values in the data structure. YAML::Syck does this. YAML/YAML::XS/JSON/JSON::XS all take the scalars with UTF8 values in them and produce data structures containin perl encodings.
| [reply] |