in reply to Re^3: Behaviour of Encode::decode_utf8 on ASCII
in thread Behaviour of Encode::decode_utf8 on ASCII
The data in this case is coming from a db with a db layer which isn't capable of automatically tagging data as utf8 (as well as sundry other places).
But simply replacing calls to decode with calls to a wrapper function which does this check adds an additional perl function call and regex per db call, which has its own (small) overhead.
It's do-able, and is the best way forward I can see at the moment, but I was hoping for an "ah...that behaviour changed in version X.y, you can get the old behaviour by frobbing this magic flag", from a wise monk. (I couldn't see anything in Encode.pm and friends, but I didn't dig into the XS).
I'm also still very surprised that this behaviour has changed against the docs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Behaviour of Encode::decode_utf8 on ASCII
by graff (Chancellor) on Feb 15, 2007 at 09:37 UTC | |
by jbert (Priest) on Feb 15, 2007 at 12:57 UTC |