No such thing as a small change | |
PerlMonks |
[not perl] unicode/utf8 in browsers and OS's - where does conversion happen?by danmcb (Monk) |
on Jan 05, 2008 at 18:52 UTC ( [id://660558]=perlquestion: print w/replies, xml ) | Need Help?? |
danmcb has asked for the wisdom of the Perl Monks concerning the following question: Hi Monks Please forgive (mea culpa) that this is not really a perl question. But I thought it was an interesting question, and should concern anyone involved with web programming, in any form. And there are smart people here who might even know the answer. The question is this : we all know that unicode should generally get transmitted over the wire by the browser as UTF8 (provided that the form is setup correctly and so on). But what happens when javascript grabs that input and does some AJAX tomfoolery with it? SHould the javascript see the input already converted to UTF8, or unicode? Or is the answer "not defined"? And even more tricky - when a user enters data into a form by unknown method (they could but using MS regional options to specify the keyboard type, for instance Turkish Q, or they might use special software to input Devnagari, hopefully as UTF8, or they may just cut paste from god knows where) - what should/does the OS (almost always Windows) do? COnvert into UTF8 because the form wants it? Just cut/paste and let the browser sort it out? This seems fraught with issues because you cannot really tell that a string is a UTF8 string just by looking at it. (You *might* be able to tell that it is *not* one ...) If anyone can assist my poor addled brain, which really shouldn't be dealing with this right after 2 days of flu, I will become most eternally unjustifiable about it all. Thanks.
Back to
Seekers of Perl Wisdom
|
|