There's a difference between what encoding to apply to the data vs. what
to report in the HTTP response. The ns/mimetypes section controls the
HTTP response, while the ns/parameters settings control the encoding of
the data.
--
Dossy Shiobara | do...@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <list...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
I've been around a while but this is my first post to the aolserver
list.
I have a .LRN site running on AOLserver 4.0.10 and this week we added
static html pages on that site. Those pages are encoded in utf-8, the
html head block has a http-equiv for content-type with content="text/
html; charset=utf-8", the file system of the server is using utf-8 and
the ns/parameters section of the aolserver config file contains:
ns_param HackContentType 1
ns_param DefaultCharset utf-8
ns_param HttpOpenCharset utf-8
ns_param OutputCharset utf-8
ns_param URLCharset utf-8
however the content-type in the http header of the response would read:
Content-Type: text/html; charset=iso-8859-1
so the browser would set the charset to iso instead of utf-8 and
spanish characters wouldn't be rendered correctly.
I had to add 'ns_param .html "text/html; charset=utf-8"' in the ns/
mimetypes section to get the charset correctly in the http header. I
was expecting the OutputCharset to be applied by default, as it is
when adp or tcl files are served, but apparently it doesn't and I
don't understand why. Did I miss anything?
Cheers,
Emmanuelle
Ah, OK. But why the http headers content type for adp and tcl files is
set to "text/html; charset=utf-8" and set to "text/html;
charset=iso-8859-1" for the html ones then? Sorry to insist on that
but I'd like to understand :). There's nothing in the mimetypes
section of my config file about adp and tcl files so I guess it's
handled internally or is there a parameter to set the default charset
to be reported in the HTTP response that I'm missing?
Thanks.
In nsd/mimetypes.c, there's a default table of MIME types. Some of
those defaults use NSD_TEXTHTML as the type, which currently is
"text/html; charset=iso-8859-1".
These defaults can all be overridden by explicit config settings in the
ns/mimetypes section.
--
Dossy Shiobara | do...@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)