<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shekhar Govindarajan's Blog &#187; Apache web server</title>
	<atom:link href="http://www.shekhargovindarajan.com/tag/apache-web-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shekhargovindarajan.com</link>
	<description>My Notepad on the Web</description>
	<lastBuildDate>Tue, 07 Sep 2010 05:58:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com/" />
			<item>
		<title>Display Microsoft Word&#8217;s Special Characters through Apache</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/display-microsoft-words-special-characters-through-apache/?&amp;owa_from=feed&amp;owa_sid=&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=display-microsoft-words-special-characters-through-apache</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/display-microsoft-words-special-characters-through-apache/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 04:18:36 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[AddDefaultCharset]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Apache server]]></category>
		<category><![CDATA[Apache web server]]></category>
		<category><![CDATA[Apache web server side]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[Comment]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ISO-8859-1]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mail server]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[special characters]]></category>
		<category><![CDATA[text editor]]></category>
		<category><![CDATA[web browser]]></category>
		<category><![CDATA[web browser problem]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[web server side]]></category>
		<category><![CDATA[weird characters]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=583</guid>
		<description><![CDATA[Recently, I carried out a Linux server upgrade for a client where I did a clean install of the latest operating system/distribution. Since it was a clean install I had to backup and note down the earlier configuration (of mail server, web server, database) and redo those changes. Mostly I preferred not to simply overwrite [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I carried out a Linux server upgrade for a client where I did a clean install of the latest operating system/distribution. Since it was a clean install I had to backup and note down the earlier configuration (of mail server, web server, database) and redo those changes. Mostly I preferred not to simply overwrite with the backed up configuration files. I rather documented and edited the configuration manually.</p>
<p>It all seemed to have gone smoothly and the new server has been up and running. But one not-so-fine day, the client started complaining that some HTML pages are not displaying properly. These were showing question marks (?) and some other weird characters. I figured out that these HTML pages were generated using Microsoft Word and had those special characters (closing quotes, double hyphens etc.). I discussed with the client that this could be a web browser problem because it is not able to use the correct character set.<span id="more-583"></span>But the client insisted that such pages used to display properly earlier, before the upgrade.  This meant I have missed redoing some configuration. The obvious suspect was at Apache web server side. After all it is Apache which is serving these web pages to the browser. Hence, if the culprit is not the web browser then it better be the web server. After parsing through the Apache&#8217;s configuration file I spotted a comment against a directive (or configuration option) called AddDefaultCharset which said:</p>
<p># Specify a default charset for all content served; this enables<br />
# interpretation of all content as UTF-8 by default.  To use the<br />
# default browser choice (ISO-8859-1), or to allow the META tags<br />
# in HTML content to override this choice, comment out this<br />
# directive:</p>
<p>I followed it and commented out the directive and voila it worked!</p>
<p>To sum up, if HTML files served by an Apache web server  are not displaying special characters properly in a web browser (IE, Firefox etc.), the solution is:</p>
<ul>
<li>Open the Apache&#8217;s configuration file named httpd.conf (found in the directory /etc/httpd/conf for RedHat based Linux distributions) in a text editor</li>
<li>Comment out, by prefixing a hash (#), the line which says &#8220;AddDefaultCharset UTF-8&#8243; such that it looks as follows:<strong> </strong><strong><br />
# AddDefaultCharset UTF-8<br />
</strong></li>
<li>Save the file and reload/restart Apache server. For RedHat based distributions you can do this via &#8220;service httpd reload&#8221;</li>
</ul>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=583&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/display-microsoft-words-special-characters-through-apache/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
