Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] apache2 setup and japanese charset



On Fri, Jul 04, 2003 at 11:12:58AM -0400, Kevin Coyner wrote:
> 
> 
> On Fri, Jul 04, 2003 at 11:52:26PM +0900, Edward Wright wrote......
> 
> > > My gut tells me that this is in the Apache2 httpd.conf settings.  And
> > > while I've found references to CharSets for shift-jis and Euc-JP in
> > > there, I'm not sure what to do with them and haven't figured it out from
> > > the docs at Apache.org.
> > >
> > 
> > If your gut told you to look in there for "charset" you'd be home :)
> > 
> > Check for "AddDefaultCharset" and do the right thing.
> 
> AddDefaultCharset is there (by default) and set at ISO-8859-1.
> 
> I didn't change it because the website pages are primarily English with
> some Japanese, so being ISO-8859-1 seemed right.  
> 
> Plus below I did find the following:
> 
> AddCharset ISO-2022-JP .iso2022-jp .jis
> AddCharset EUC-JP      .euc-jp
> AddCharset shift_jis   .sjis
> 
> Are there others to add?  Does order matter?
> 
> I'm just wondering why browsers (regardless of whether MSIE or Mozilla
> or Galeon or whatever) now have to specifically be set at shift-jis
> where they didn't need to be set that way before (iso-8859-1 did fine).

"Something" needs to tell the browser what character set to use. The web
server specifies the character set in the header it sends to the browser.
Hence the "Default" in "AddDefaultCharset". Generally, an English page
will render ok with a default character set of Japanese, although occasionaly
a character from outside the basic set will get mangled. A better solution
IMHO is to use a meta tag on each page specifying the character set. E.g.
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
Most browsers will then render the page in that charset regardless of
what the web server sends out as a default.

"AddCharset" maps filename extensions to character sets. The documentation
inside the httpd.conf file is actually pretty good about all this stuff.

Hope that helps.
Ed


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links