<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Setting charset in htaccess</title>
	<atom:link href="http://www.askapache.com/htaccess/setting-charset-in-htaccess.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Wed, 18 Nov 2009 23:28:48 -0500</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: yemek tarifleri</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-100914</link>
		<dc:creator>yemek tarifleri</dc:creator>
		<pubDate>Sun, 06 Sep 2009 10:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-100914</guid>
		<description>&lt;strong&gt;@ Brent&lt;/strong&gt;

Another possibility is a small one but maybe its the problem.  Apache serves &lt;code&gt;ErrorDocuments&lt;/code&gt; by default using iso, the same can be said for Apache-generated directory index pages. Depending on the version of Apache you are using, you can change this.</description>
		<content:encoded><![CDATA[<p><strong>@ Brent</strong></p>
<p>Another possibility is a small one but maybe its the problem.  Apache serves <code>ErrorDocuments</code> by default using iso, the same can be said for Apache-generated directory index pages. Depending on the version of Apache you are using, you can change this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yosef Boudra</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-80167</link>
		<dc:creator>Yosef Boudra</dc:creator>
		<pubDate>Tue, 09 Jun 2009 10:16:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-80167</guid>
		<description>Hi

I&#039;m looking for a solution - 
I have an Apache server (shared) and the default charset is &lt;code&gt;utf-8&lt;/code&gt;, but when I write things in French the chars are showed as little cubes.

So when I put in my meta tags I get weird chars showing up because I&#039;m not using &lt;code&gt;UTF&lt;/code&gt;.

So either I&#039;m using &lt;code&gt;UTF&lt;/code&gt; and get french cubes or &lt;code&gt;ISO-8859&lt;/code&gt; and get cubes but in both ways i get errors in my text... Please help me</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I&#8217;m looking for a solution &#8211;<br />
I have an Apache server (shared) and the default charset is <code>utf-8</code>, but when I write things in French the chars are showed as little cubes.</p>
<p>So when I put in my meta tags I get weird chars showing up because I&#8217;m not using <code>UTF</code>.</p>
<p>So either I&#8217;m using <code>UTF</code> and get french cubes or <code>ISO-8859</code> and get cubes but in both ways i get errors in my text&#8230; Please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: משקפיים</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-77198</link>
		<dc:creator>משקפיים</dc:creator>
		<pubDate>Thu, 28 May 2009 21:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-77198</guid>
		<description>what about hebrew font?</description>
		<content:encoded><![CDATA[<p>what about hebrew font?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Stegner</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-53039</link>
		<dc:creator>Brian Stegner</dc:creator>
		<pubDate>Sun, 04 Jan 2009 03:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-53039</guid>
		<description>&lt;p&gt;I love this site. But i&#039;m having a very rough year, and my server people, &lt;em&gt;Racksopace/Mosso&lt;/em&gt;, have their &lt;strong&gt;Apache configured by a Windows IIS guy&lt;/strong&gt;, from the looks of it,. Sending &lt;code&gt;text/html&lt;/code&gt; out, disregarding 100% validated &lt;code&gt;XHTML&lt;/code&gt; with the only appropriate content-type: &lt;code&gt;application/xhtml+xml&lt;/code&gt; and &lt;code&gt;UTF-8&lt;/code&gt;, so we end up with &lt;code&gt;ISO-8859-1&lt;/code&gt; and &lt;code&gt;text/html&lt;/code&gt;. If i wanted to deal html, I&#039;d write html 4.01 and let their 1994-style defaults have their way.&lt;/p&gt;

&lt;p&gt;But I associated &lt;code&gt;application/xhtml+xml&lt;/code&gt; with &lt;code&gt;.html&lt;/code&gt; files, and these guys are acting like &lt;em&gt;&#039;content-negotiation&#039;&lt;/em&gt;. is terrorism or something. This site&#039;s the best, of all the ones I&#039;ve seen, but I am not going to redo web sites as PHP, just to feed Explorer some nice 1994 quirks mode bs. So, I am still looking for an htaccess or mod_rewrite idea that can simply deal some nice html to Windows, and let real deal pass through to everybody else.&lt;/p&gt;

&lt;p&gt;I&#039;m about ready to just put a portal up with a click here or click there &#039;choice&#039; for Win IE here, everybody else over there. if the guys back at CECOM even knew I was thinking of this idea, I&#039;d be mud. Why are all these other guys writing xhtml and then stripping it of any possible benefits to go out as html? That seems irrational. I heard that with xhtml 1.1 that &lt;code&gt;text/xml&lt;/code&gt; won&#039;t even validate, so what are these xhtml guys planning on next? But the site is terrific, I wish I understood the context, a lot more, of some of these principles and methods.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I love this site. But i&#8217;m having a very rough year, and my server people, <em>Racksopace/Mosso</em>, have their <strong>Apache configured by a Windows IIS guy</strong>, from the looks of it,. Sending <code>text/html</code> out, disregarding 100% validated <code>XHTML</code> with the only appropriate content-type: <code>application/xhtml+xml</code> and <code>UTF-8</code>, so we end up with <code>ISO-8859-1</code> and <code>text/html</code>. If i wanted to deal html, I&#8217;d write html 4.01 and let their 1994-style defaults have their way.</p>
<p>But I associated <code>application/xhtml+xml</code> with <code>.html</code> files, and these guys are acting like <em>&#8216;content-negotiation&#8217;</em>. is terrorism or something. This site&#8217;s the best, of all the ones I&#8217;ve seen, but I am not going to redo web sites as PHP, just to feed Explorer some nice 1994 quirks mode bs. So, I am still looking for an htaccess or mod_rewrite idea that can simply deal some nice html to Windows, and let real deal pass through to everybody else.</p>
<p>I&#8217;m about ready to just put a portal up with a click here or click there &#8216;choice&#8217; for Win IE here, everybody else over there. if the guys back at CECOM even knew I was thinking of this idea, I&#8217;d be mud. Why are all these other guys writing xhtml and then stripping it of any possible benefits to go out as html? That seems irrational. I heard that with xhtml 1.1 that <code>text/xml</code> won&#8217;t even validate, so what are these xhtml guys planning on next? But the site is terrific, I wish I understood the context, a lot more, of some of these principles and methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dharmendra</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-47489</link>
		<dc:creator>dharmendra</dc:creator>
		<pubDate>Tue, 25 Nov 2008 18:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-47489</guid>
		<description>is there a way to conditionally enable htaccess authentication when browser (http accept language) is like &lt;code&gt;^zh&lt;/code&gt; (Chinese)? something like this -

&lt;pre&gt;
SetEnvIf HTTP_ACCEPT_LANGUAGE ^zh.* I_AM_CHINESE
&#160;
Order allow,deny
Allow from all
Deny from I_AM_CHINESE
AuthName &quot;Authorized Users Only.&quot;
AuthType Basic
AuthUserFile .htpasswd
require valid user
satisfy any
&lt;/pre&gt;

Any help is appreciated :)</description>
		<content:encoded><![CDATA[<p>is there a way to conditionally enable htaccess authentication when browser (http accept language) is like <code>^zh</code> (Chinese)? something like this -</p>
<pre>SetEnvIf HTTP_ACCEPT_LANGUAGE ^zh.* I_AM_CHINESE
&nbsp;
Order allow,deny
Allow from all
Deny from I_AM_CHINESE
AuthName "Authorized Users Only."
AuthType Basic
AuthUserFile .htpasswd
require valid user
satisfy any</pre>
<p>Any help is appreciated :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lavinya</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-46754</link>
		<dc:creator>lavinya</dc:creator>
		<pubDate>Mon, 03 Nov 2008 13:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-46754</guid>
		<description>Hello all. Thanks for this article.

&lt;strong&gt;my &lt;code&gt;php.ini&lt;/code&gt;&lt;/strong&gt;:
&lt;pre&gt;
default_mimetype = &quot;text/html&quot;
default_charset = &quot;utf-8&quot;
&lt;/pre&gt;

&lt;strong&gt;my apache &lt;code&gt;httpd.conf&lt;/code&gt;&lt;/strong&gt;:
&lt;pre&gt;
AddDefaultCharset UTF-8
&lt;/pre&gt;

&lt;strong&gt;my page encoding: &lt;code&gt;utf-8&lt;/code&gt; without bom.&lt;/strong&gt;

after i check my page server headers result:
&lt;pre&gt;
content-type:   text/html; charset=UTF-8, text/html; charset=UTF-8
&lt;/pre&gt;

Why have two values ???

&lt;hr class=&quot;C&quot; /&gt;

after disabled this line to:
&lt;pre&gt;
#AddDefaultCharset UTF-8 and
#default_charset = &quot;utf-8&quot;
&lt;/pre&gt;
restart my apache:

refresh my page... wrong character encodings on this my page.... please help me.. (sorry my english not enough)</description>
		<content:encoded><![CDATA[<p>Hello all. Thanks for this article.</p>
<p><strong>my <code>php.ini</code></strong>:</p>
<pre>default_mimetype = "text/html"
default_charset = "utf-8"</pre>
<p><strong>my apache <code>httpd.conf</code></strong>:</p>
<pre>AddDefaultCharset UTF-8</pre>
<p><strong>my page encoding: <code>utf-8</code> without bom.</strong></p>
<p>after i check my page server headers result:</p>
<pre>content-type:   text/html; charset=UTF-8, text/html; charset=UTF-8</pre>
<p>Why have two values ???</p>
<hr class="C" />
<p>after disabled this line to:</p>
<pre>#AddDefaultCharset UTF-8 and
#default_charset = "utf-8"</pre>
<p>restart my apache:</p>
<p>refresh my page&#8230; wrong character encodings on this my page&#8230;. please help me.. (sorry my english not enough)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-43415</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Tue, 22 Jul 2008 20:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-43415</guid>
		<description>Thanks, this was very helpful. The CPAN module Sendmail.pm uses &#039;text/plain; charset=&quot;iso-8859-1&quot;&#039;, so overriding that helps our emails with Chinese characters in them be read properly.</description>
		<content:encoded><![CDATA[<p>Thanks, this was very helpful. The CPAN module Sendmail.pm uses &#8216;text/plain; charset=&#8221;iso-8859-1&#8243;&#8216;, so overriding that helps our emails with Chinese characters in them be read properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brent</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-39706</link>
		<dc:creator>brent</dc:creator>
		<pubDate>Wed, 23 Apr 2008 04:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-39706</guid>
		<description>wow this is huge, thanks!!  I didn&#039;t think they allowed me to have my own custom php.ini on dreamhost, -- it&#039;s not very well publicized

one question, you mentioned making the cgi-bin directory in my website&#039;s document root with this command:

&lt;pre&gt;mkdir -p cgi-bin&lt;/pre&gt;

I&#039;ve already made a cgi-bin directory one directory before my website directory, this is where I have the python script I run to make my google sitemap.  Is this where I should be putting the files, or does it go into my website root?

I remember hearing somewhere that putting certain files in a webspace would be a security risk.

brent</description>
		<content:encoded><![CDATA[<p>wow this is huge, thanks!!  I didn&#8217;t think they allowed me to have my own custom php.ini on dreamhost, &#8212; it&#8217;s not very well publicized</p>
<p>one question, you mentioned making the cgi-bin directory in my website&#8217;s document root with this command:</p>
<pre>mkdir -p cgi-bin</pre>
<p>I&#8217;ve already made a cgi-bin directory one directory before my website directory, this is where I have the python script I run to make my google sitemap.  Is this where I should be putting the files, or does it go into my website root?</p>
<p>I remember hearing somewhere that putting certain files in a webspace would be a security risk.</p>
<p>brent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-39648</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Tue, 22 Apr 2008 07:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-39648</guid>
		<description>&lt;p&gt;&lt;strong&gt;@ Brent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How in the world do you survive without a custom php.ini?  I run dreamhost as well and heres how to get running in 3 minutes.  First, login via ssh cd to your websites document root and then run these commands.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;mkdir -p cgi-bin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp -rp /dh/cgi-system/php5.cgi .&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp -rp /etc/php5/cgi/php.ini .&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now add this to your root &lt;code&gt;.htaccess&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;
AddHandler php-cgi .php .htm
Action php-cgi /cgi-bin/php5.cgi
&lt;/pre&gt;

&lt;p&gt;Ok?  Good now you can do everything I talk about.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p><strong>@ Brent</strong></p>
<p>How in the world do you survive without a custom php.ini?  I run dreamhost as well and heres how to get running in 3 minutes.  First, login via ssh cd to your websites document root and then run these commands.</p>
<ol>
<li><code>mkdir -p cgi-bin</code></li>
<li><code>cp -rp /dh/cgi-system/php5.cgi .</code></li>
<li><code>cp -rp /etc/php5/cgi/php.ini .</code></li>
</ol>
<p>Now add this to your root <code>.htaccess</code></p>
<pre>AddHandler php-cgi .php .htm
Action php-cgi /cgi-bin/php5.cgi</pre>
<p>Ok?  Good now you can do everything I talk about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brent Lagerman</title>
		<link>http://www.askapache.com/htaccess/setting-charset-in-htaccess.html#comment-39630</link>
		<dc:creator>Brent Lagerman</dc:creator>
		<pubDate>Tue, 22 Apr 2008 01:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/setting-charset-in-htaccess.html#comment-39630</guid>
		<description>Thanks so much for the followup

The problem is that I can&#039;t get to php.ini since I&#039;m on a shared host (dreamhost) they run php as cgi.

I put these lines in the beginning of all the files and it seems to have worked,

&lt;pre&gt;header(&#039;Content-type: text/html; charset=UTF-8&#039;);&lt;/pre&gt;

but it&#039;d be much nicer to use .htaccess or just have it declared once somewhere instead of on every file.

brent</description>
		<content:encoded><![CDATA[<p>Thanks so much for the followup</p>
<p>The problem is that I can&#8217;t get to php.ini since I&#8217;m on a shared host (dreamhost) they run php as cgi.</p>
<p>I put these lines in the beginning of all the files and it seems to have worked,</p>
<pre>header(&#039;Content-type: text/html; charset=UTF-8&#039;);</pre>
<p>but it&#8217;d be much nicer to use .htaccess or just have it declared once somewhere instead of on every file.</p>
<p>brent</p>
]]></content:encoded>
	</item>
</channel>
</rss>
