I'm finishing up a project based on OpenACS 3 that has to work in
Hebrew, English, and Arabic. We're using Unicode (UTF-8) in
PostgreSQL, and so far things are working just great; we have the
bboard and other dynamic stuff working without any problem in all
three languages.
The problem, ironically, is that HTML pages aren't coming through with
the right charset. That is, if I take a page and give it an .adp
extension, then the "Content-type" header comes through as
text/html; charset=utf-8
which is supposed to be the case. But if I rename that same file with
an .html extension, the "Content-type" header suddenly becomes
text/html
which means that the page gets the default Web encoding of Latin-1,
which is very clearly wrong.
I can't figure out what I'm doing wrong here. I'm running AOLServer
3.4 (nsd_v3_r4), which might indeed be the problem -- except that my
configuration is working perfectly for .adp, and not at all for .html.
Here's what I have in ns/mimetypes:
ns_param ".tcl" "text/html; charset=utf-8"
ns_param ".adp" "text/html; charset=utf-8"
ns_param ".html" "text/html; charset=utf-8"
ns_param ".htm" "text/html; charset=utf-8"
It's clear that .html files are handled differently from .adp files,
but I can't figure out how. Is my only solution to rename everything
with an .adp extension? (That's not a horrible solution, but it
really won't satisfy my curiosity.)
I realize that OpenACS 3 is on its way out, and I've been rather
impressed with what I've had a chance to play with during my limited
time. But if anyone can step in and help me here, I would appreciate
it!