[Javascript] Re: Charset (sort-of OFF_TOPIC for js)

David Dorward david at dorward.me.uk
Mon Aug 14 10:20:04 CDT 2006


On Mon, Aug 14, 2006 at 10:34:54AM -0400, tedd wrote:
> >First, it should be pointed out that sticking the details of the
> >encoding in a <meta> element and expecting the client to read that is
> >a nasty hack (which comes with a bunch of provisos).
> 
> So using a meta tag for encoding is a bad thing?

That is debatable, at best its the poor man's method though.
  
> >The proper place for this information is in the HTTP header sent by
> >the server before the document itself.

> Okay, so how does one do that?

That depends on your webserver
 
> Let's make this simple for me. I'm preparing a web page -- what do I 
> do? Where is it that I can make the HTTP header do anything? Do I use 
> a .htacess file, click my heels together three times, or what?

Under Apache you can use a .htaccess file, or you can set it in the
regular configuration. I think you want to read the manual section on
mod_mime for the specifics.

> The encoding problem/solution is simply one of expanding the Internet 
> from the limited assortment of characters provided by 7-bit ASCII to 
> 8-bit (and higher) Unicode code points. It's not the language, but 
> rather the expanded number of code points that are made available for 
> use in web documents. Right?

A given sequence of bytes in one encoding might mean "e acute" while
meaning "horizontal ellipsis" in another. (I just made that one up, I
don't know any encodings well enough to give real examples).
 
-- 
David Dorward                                      http://dorward.me.uk




More information about the Javascript mailing list