![]() |
|
Think about Loose Coupling | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
I think you're right that the OP needs to grasp the mental model you've laid out. But I predict that until the OP masters debugging the encoding -- which requires understanding the role of the UTF8 flag -- problems are going to keep cropping up. If there were an "encoded/decoded" flag that you could check, that would be lovely. Since no such flag exists, you need to be able to look at the raw string and the presence/absence of the UTF8 flag in Devel::Peek to see what's going wrong. There are simply too many opportunities to mess up. Forget a binmode() here, omit (or include) a -utf8 argument there, forget to set pg_enable_utf8 on your DBD::Pg db handle, pass something through YAML::Syck without setting $YAML::Syck::ImplicitUnicode, and so on. In short... documentation and Hungarian notation are too unreliable :) -- because the underlying system is too hard to control from a high level. IMO, the only way to achieve high reliability for UTF-8 is to write tests.
PS: You updated your node multiple times over the half hour or so after it was posted, forcing me to keep rewriting my reply. :( In reply to Re^4: UTF-8: Trying to make sense of form input
by creamygoodness
|
|