Re: browsers and unicode surrogates

From: jshin@mailaps.org
Date: Mon Apr 22 2002 - 14:24:56 EDT


> "James H. Cloos Jr." wrote:
> >
> > Since you are using apache, it is quite easy to get the extra headers
> > sent at the protocol level rather than having to use meta tags.
> >
> > You can use a Header directive in an .htaccess file a la:
> >
> > <Files foobar.html>
> > Header set Content-Language en-US
> > Header set Content-Type text/html; charset=UTF-8
> > </Files>

  Thank you for this tip. I didn't know this and ended up
'cluttering' my filenames with charset suffices at
<http://jshin.net/i18n/utftest>.

> > There are other ways as well. Apache will already (if you use the
> > default configs) add the Content-Language header if you use a filename
> > like foo.en.html. You could have it also add the charset via a
> > similar mechanism. Something like:
> >
> > AddCharset UTF-8 utf8
> >
> > will make foobar.en.utf-8.html send the headers:
> >
> > Content-Language: en
> > Content-Type: text/html; charset=UTF-8
> >
> > given the default configs for language and type extensions.

> > Hmmm. Looking at a recent install of SuSE, using their apache rpm,
> > .utf8 is already configured as an extension to set charset=UTF8, so
> > you could try just renaming the file to eg:
> >
> > http://www.i18nguy.com/unicode-plane1.utf8.html
> >
> > to set the charset. You'd have to add your own AddCharset directives
> > for UTF-16 and UTF-32.

  The only way I was aware of was this and I added the following
lines to my Apache 1.3.x server configuration file for test pages
mentioned above.

  AddCharset UTF-32BE .utf32be
  AddCharset UTF-32LE .utf32le
  AddCharset UTF-16LE .utf16le
  AddCharset UTF-16BE .utf16be
  AddCharset UTF-16 .utf16
  AddCharset UTF-32 .utf32

  Jungshik Shin



This archive was generated by hypermail 2.1.2 : Mon Apr 22 2002 - 15:47:49 EDT