Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: [not perl] unicode/utf8 in browsers and OS's - where does conversion happen?

by kirillm (Friar)
on Jan 05, 2008 at 22:42 UTC ( #660582=note: print w/replies, xml ) Need Help??


in reply to [not perl] unicode/utf8 in browsers and OS's - where does conversion happen?

This is very good question and I'm looking forward to all good responses. I'd like to add my two cents though.

Personally I just generate the page in utf-8, put into the content-type header that charset is utf-8 and add the accept-charset attribute to the form tag and hope that the client does the right thing:

<form [...] accept-charset="utf-8"> [...] </form>

This seems to work fine and the content from the clients does come in utf-8.

  • Comment on Re: [not perl] unicode/utf8 in browsers and OS's - where does conversion happen?
  • Download Code

Replies are listed 'Best First'.
Re^2: [not perl] unicode/utf8 in browsers and OS's - where does conversion happen?
by danmcb (Monk) on Jan 06, 2008 at 18:39 UTC

    right. I have been doing that do. But if the submision happens via AJAX rather than the normal browser form submision, does the javascript still see utf8? Always?

    A little googling suggests that support for accept-charset is patchy across browsers, so I have been wondering about relying on this. Haven't done any hard tests though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://660582]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-08-11 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?