Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UTF-8

Status
Not open for further replies.

ochavo

Programmer
Sep 22, 2008
4
US
Hello

I would like to process UTF-8 form content using a CGI script. Does anyone know how to configure apache to accept UTF-8 form content? Any help would be appreciated.

Thanks
 
To my knowledge, you don't have to do anything for apache to accept utf-8 stuff. For example I upload my genealogy gedcom file in utf-8 and the online program reads and displays data from it with no problem. If I may go off topic here for a sec, are you still trying to get your russian webpages to display correctly? There is a directive in apache that may help in your case. It is AddDefaultCharset. It takes one of three arguments [ On | Off | charset]. The default is Off and the default charset is iso-8859-1. I think you want iso-8859-5. So add this line to your website's vhost container:

AddDefaultCharset iso-8859-5

What this will do is anytime apache serves a text/plain or text/html page it will use the charset you used here.

 
Hello RythemAce

Thank you for your reply and help, much appreciated!

I did get my web pages to display correctly in the browsers by adding content="text/html; charset=utf-8" to the HTML web pages.

However, the problem I am having is when a Form is submitted, that has utf-8 content, the CGI script retrieves the value=name pairs and they are in hexidecimal, and I need to convert them back to utf-8, the language. Perhaps what I may need now ia a good decoder/comverter? Any ideas would be much appreciated!

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top