NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
That's a good list but it's just the start... (Score:3, Interesting)
My current favourite is POSTing XML to a server using lwp. You send the XML, it looks fine from the client, but when the server reads it in, it's got the final few characters chopped off. Why? Because when LWP is calculating the Content-Length header, it's getting the length in characters not bytes. So you have to make sure that you convert to bytes before you use LWP to send information across a networ
Re:That's a good list but it's just the start... (Score:2, Informative)
HTML 4.01 spec says [w3.org]:
If you enter non-ASCII chars both latest versions of IE and Opera encode it correctly (i.e. by converting them in UTF-8 first and converting each byte to %HH). Mozilla 1.0 doesn't do it (I have not tried latest releases yet).And then I have no idea how to make Apache::Request or CGI do the right thing.
I use my own wrapper of Apache::Request:
Datamodel::Tools::utf8_upgrade is a sub that converts byte string which contains UTF-8 text into native UTF-8 Perl string. I think it can be replaced with one of subroutines from utf8 module but I have not tried it (part of this code was written before I decided it is a waste of time trying to workaround unicode problems in 5.6.1 and utf8 subroutines are only available in 5.8.0)Ilya Martynov (http://martynov.org/ [martynov.org])
Reply to This
Parent
Re:That's a good list but it's just the start... (Score:2)
-Dom
Re:That's a good list but it's just the start... (Score:2, Insightful)
Ilya Martynov (http://martynov.org/ [martynov.org])