Hacker News new | past | comments | ask | show | jobs | submit login

Here's a solution that covers a bunch of charset bases if you want to move to UTF-8:

1) Add accept_charset="UTF-8" to your form tag.

2) Add the hidden variable _charset_ with no value.

3) Add <meta http-equiv="content-type" content="text/html; charset=UTF-8"> right after the head tag in the html.

4) Make sure apache is serving the file in UTF-8 by default, which is usually by accomplished by adding AddDefaultCharset UTF-8 to the relevant virtual host configuration.

Some of this stuff is redundant, but doing the above will usually ensure the page and form view and submit in UTF-8. To be extra sure, you can double check the value of the _charset_ variable that gets passed.

If you are using postgres and/or perl, I can give more details on what to do there as well.




I'm not using Apache. I wrote the http server in Arc. Actually I think I know where the bug is: in my urldecode fn. Fix coming soon I hope. But not today: I have to cook dinner for the startups.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: