LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-15-2008, 04:53 AM   #1
cooljai
Member
 
Registered: May 2007
Location: /dev/random
Distribution: CentOS, Fedora, RHEL, SuSE
Posts: 62

Rep: Reputation: 15
Question How to set Charset to UTF-8 in Apache for scripts?


Hi,
I'm on CentOS 5 machine and thought changing default charset of 'ISO-8859-1' to 'UTF-8' is not a big deal in Apache 2.2, so I updated httpd.conf to have this line:
Code:
AddDefaultCharset UTF-8
Restarted Apache and open default page in Firefox:
Code:
http://serverip/
it showing good 'UTF-8'. Now when I try to run perl scripts:
Code:
http://serverip/cgi-bin/myscript.pl
it shows 'ISO-8859-1' charset instead of expected 'UTF-8' while checking from browser. We are not setting any specific config in perl and Apache should report Charset as 'UTF-8'.

How can I force Apache to set UTF-8 for all contents it serve, including perl scripts? Kindly suggest, I'm out of ideas...

Regards,
 
  


Reply

Tags
apache, charset, perl, scripts, utf8



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set the right charset (or desired) amimusa Debian 1 04-05-2007 03:07 AM
Conversion from character set 'UTF-8' to @local error Postgre Slackware 2 09-11-2006 09:15 PM
UTF-8 charset int ext3 ApuX Linux - Software 2 07-12-2006 12:09 PM
charset in Apache 2 swmok Linux - Software 2 06-14-2005 01:57 AM
charset "UTF-8" not supported, using "ISO8859-1". satishpatel Linux - Software 3 04-09-2004 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration