httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohan Nandode <rnand...@yahoo.com>
Subject Character Encoditing in response
Date Tue, 25 Nov 2003 16:36:26 GMT
Hi,

I have Apache 2.0.45 running on Solaris.

I have set  "AddDefaultCharset utf-8" in my httpd.conf
file. And its get reflected in the HTTP headers in the
response.
But I want to specify character encoding in the
generated HTML response also. E.g. When I try to
access a directory, the directory listing is shown
correctly, but no encoding is set in the HTML. The
page source shows :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2
Final//EN">

I want some additional information in the page like:
<META http-equiv="Content-Type" content="text/html;
charset=utf-8">

I debugged through the code: in function
"index_directory" in mod_autoindex.c, there are lines:
#if APR_HAS_UNICODE_FS
    ap_set_content_type(r, "text/html;charset=utf-8");
#else
    ap_set_content_type(r, "text/html");
#endif

On Solaris, APR_HAS_UNICODE_FS is by default 0. 
Will enabling this define solve the problem? 
And what will be the side-effect of this, as this flag
is used at many other places.
If not, what would be the other way to solve the
problem?


Thanks in advance
Rohan

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Mime
View raw message