You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kalin Mintchev <ka...@el.net> on 2004/03/25 23:19:05 UTC

[users@httpd] AddDefaultCharset


hi all,

some problems with AddDefaultCharset

i'm trying to use the AddDefaultCharset in apache 1.3 conf to set the
charset to gb2312 - simple chinese...

this is how i do it:

<Directory /web/htdocs/ch/ >
        AddDefaultCharset gb2312
</Directory>

it doesn't work.

here are the to examples. same pages:

from my server:
http://danwen.com/ch/test.html

and the same page from ch.yahoo.com:
http://cn.sports.yahoo.com/basketball/nba/

they don't look the same.

the mime types however are the same. if i take the mime type off my page
i get garbage like this:
http://danwen.com/ch/test2.html

which means the AddDefaultCharset doesn't work....

can anybody explain...

thanks...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 26 Mar 2004, Kalin Mintchev wrote:
> Content-Type: text/plain; charset=gb2312
>
>
> it looks different but still nowhere near this:
>
> http://cn.sports.yahoo.com/basketball/nba/
>
> look at the links in the tabs - they look different...
>
> what next? thanks....

No idea.  I know a little about apache configuration (which seems correct
in this case), but I know nothing about Chinese character sets.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Kalin Mintchev <ka...@el.net>.
uhh...  knock, knock?!?....
i still have to solve this. it's obviously something with apache...



> On Thu, 25 Mar 2004, Joshua Slive wrote:
>
> >
> ok. you were right. there is something called webcatalog for .html pages.
> i put anotehr extension .cn. that one still looked the same. next - put
> everything on a different machine with apache 1.3.19 here:
>
> http://el.net/kalin/test.html
>
> for the head:
>
> HTTP/1.1 200 OK
> Date: Fri, 26 Mar 2004 05:51:08 GMT
> Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6
> DAV/1
> .0.2 PHP/4.0.4pl1 mod_perl/1.24_01 ApacheJServ/1.1.2
> Last-Modified: Fri, 26 Mar 2004 05:16:27 GMT
> ETag: "18091-10e27-4063bcc1"
> Accept-Ranges: bytes
> Content-Length: 69159
> Connection: close
> Content-Type: text/plain; charset=gb2312
>
>
> it looks different but still nowhere near this:
>
> http://cn.sports.yahoo.com/basketball/nba/
>
> look at the links in the tabs - they look different...
>
> what next?
>
> thanks....
>
>
> >
> > Joshua.
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Kalin Mintchev <ka...@el.net>.
On Thu, 25 Mar 2004, Joshua Slive wrote:

>
> On Thu, 25 Mar 2004, Kalin Mintchev wrote:
> > > > from my server:
> > > > http://danwen.com/ch/test.html
> > >
> > > lynx -head -dump http://danwen.com/ch/test.html | more
> > > HTTP/1.0 200 OK
> > > Content-type: text/html
> > > Server: Apache/1.3.27 (Unix) PHP/4.3.3 mod_ssl/2.8.14 OpenSSL/0.9.7a
> > > Connection: Close
> > > MIME-Version: 1.0
> > > Date: Thu Mar 25 20:19:02 2004 EST
> > > Last-Modified: Thu Mar 25 20:19:02 2004 EST
> > > Expires: Thu Mar 25 20:19:02 2004 EST
> > > Content-Length: 68725
> > >
> > > Something very funky going on there.
> >
> > like what?
> >
> >
> > That doesn't look like a traditional
> > > apache response.  The ordering of the headers is very different.  Are you
> > > generating the headers yourself with php or something else?
> >
> > no - plain html...  nothing else..
>
> That's just not possible.  Apache doesn't generate responses that look
> like that from its default handler.  You must have some other processing
> going on.

ok. you were right. there is something called webcatalog for .html pages.
i put anotehr extension .cn. that one still looked the same. next - put
everything on a different machine with apache 1.3.19 here:

http://el.net/kalin/test.html

for the head:

HTTP/1.1 200 OK
Date: Fri, 26 Mar 2004 05:51:08 GMT
Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6
DAV/1
.0.2 PHP/4.0.4pl1 mod_perl/1.24_01 ApacheJServ/1.1.2
Last-Modified: Fri, 26 Mar 2004 05:16:27 GMT
ETag: "18091-10e27-4063bcc1"
Accept-Ranges: bytes
Content-Length: 69159
Connection: close
Content-Type: text/plain; charset=gb2312


it looks different but still nowhere near this:

http://cn.sports.yahoo.com/basketball/nba/

look at the links in the tabs - they look different...

what next?

thanks....


>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 25 Mar 2004, Kalin Mintchev wrote:
> > > from my server:
> > > http://danwen.com/ch/test.html
> >
> > lynx -head -dump http://danwen.com/ch/test.html | more
> > HTTP/1.0 200 OK
> > Content-type: text/html
> > Server: Apache/1.3.27 (Unix) PHP/4.3.3 mod_ssl/2.8.14 OpenSSL/0.9.7a
> > Connection: Close
> > MIME-Version: 1.0
> > Date: Thu Mar 25 20:19:02 2004 EST
> > Last-Modified: Thu Mar 25 20:19:02 2004 EST
> > Expires: Thu Mar 25 20:19:02 2004 EST
> > Content-Length: 68725
> >
> > Something very funky going on there.
>
> like what?
>
>
> That doesn't look like a traditional
> > apache response.  The ordering of the headers is very different.  Are you
> > generating the headers yourself with php or something else?
>
> no - plain html...  nothing else..

That's just not possible.  Apache doesn't generate responses that look
like that from its default handler.  You must have some other processing
going on.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Kalin Mintchev <ka...@el.net>.
On Thu, 25 Mar 2004, Joshua Slive wrote:

>
> On Thu, 25 Mar 2004, Kalin Mintchev wrote:
> > some problems with AddDefaultCharset
> >
> > i'm trying to use the AddDefaultCharset in apache 1.3 conf to set the
> > charset to gb2312 - simple chinese...
> >
> > this is how i do it:
> >
> > <Directory /web/htdocs/ch/ >
> >         AddDefaultCharset gb2312
> > </Directory>
> >
> > it doesn't work.
> >
> > here are the to examples. same pages:
> >
> > from my server:
> > http://danwen.com/ch/test.html
>
> lynx -head -dump http://danwen.com/ch/test.html | more
> HTTP/1.0 200 OK
> Content-type: text/html
> Server: Apache/1.3.27 (Unix) PHP/4.3.3 mod_ssl/2.8.14 OpenSSL/0.9.7a
> Connection: Close
> MIME-Version: 1.0
> Date: Thu Mar 25 20:19:02 2004 EST
> Last-Modified: Thu Mar 25 20:19:02 2004 EST
> Expires: Thu Mar 25 20:19:02 2004 EST
> Content-Length: 68725
>
> Something very funky going on there.

like what?


That doesn't look like a traditional
> apache response.  The ordering of the headers is very different.  Are you
> generating the headers yourself with php or something else?

no - plain html...  nothing else..
this is on top of the test.html now (still doesn't work):

<META HTTP-EQUIV="Content-Language" content="zh_CN">
<meta http-equiv="content-type" content="text/html; charset=gb2312">


> This could
> explain the problem.
>
> Incidentally, this page:
> > http://cn.sports.yahoo.com/basketball/nba/
>

this is on the head of this page:

> is not sending a charset in the http headers either.  The charset comes
> from the html meta tag.
exactly...

>
> And yes, the two pages look pretty much the same from where I'm sitting.

yes except the chinese charaters are not the same. i'm don't read chinese
but they look different...

>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 25 Mar 2004, Kalin Mintchev wrote:
> some problems with AddDefaultCharset
>
> i'm trying to use the AddDefaultCharset in apache 1.3 conf to set the
> charset to gb2312 - simple chinese...
>
> this is how i do it:
>
> <Directory /web/htdocs/ch/ >
>         AddDefaultCharset gb2312
> </Directory>
>
> it doesn't work.
>
> here are the to examples. same pages:
>
> from my server:
> http://danwen.com/ch/test.html

lynx -head -dump http://danwen.com/ch/test.html | more
HTTP/1.0 200 OK
Content-type: text/html
Server: Apache/1.3.27 (Unix) PHP/4.3.3 mod_ssl/2.8.14 OpenSSL/0.9.7a
Connection: Close
MIME-Version: 1.0
Date: Thu Mar 25 20:19:02 2004 EST
Last-Modified: Thu Mar 25 20:19:02 2004 EST
Expires: Thu Mar 25 20:19:02 2004 EST
Content-Length: 68725

Something very funky going on there.  That doesn't look like a traditional
apache response.  The ordering of the headers is very different.  Are you
generating the headers yourself with php or something else?  This could
explain the problem.

Incidentally, this page:
> http://cn.sports.yahoo.com/basketball/nba/

is not sending a charset in the http headers either.  The charset comes
from the html meta tag.

And yes, the two pages look pretty much the same from where I'm sitting.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Kalin Mintchev <ka...@el.net>.

apparently the AddDefaultCharset works if the extencion of the file isn't
.html. i can live with that...

why the carsset i still not gb2312

if i put Big5 n othing comes up... nothing of the chinese text that is...

i bet there are a few million apache 1.3.*s out there that serve chinese
gb2312 without a problem - how do i configure mine to do so too?...

thank you.....

>
> it's kinda urgent. i'd appreciate any help i can get..
>
> thanks..
>
>
> On Thu, 25 Mar 2004, Kalin Mintchev wrote:
>
> >
> >
> > hi all,
> >
> > some problems with AddDefaultCharset
> >
> > i'm trying to use the AddDefaultCharset in apache 1.3 conf to set the
> > charset to gb2312 - simple chinese...
> >
> > this is how i do it:
> >
> > <Directory /web/htdocs/ch/ >
> >         AddDefaultCharset gb2312
> > </Directory>
> >
> > it doesn't work.
> >
> > here are the to examples. same pages:
> >
> > from my server:
> > http://danwen.com/ch/test.html
> >
> > and the same page from ch.yahoo.com:
> > http://cn.sports.yahoo.com/basketball/nba/
> >
> > they don't look the same.
> >
> > the mime types however are the same. if i take the mime type off my page
> > i get garbage like this:
> > http://danwen.com/ch/test2.html
> >
> > which means the AddDefaultCharset doesn't work....
> >
> > can anybody explain...
> >
> > thanks...
> >
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] AddDefaultCharset

Posted by Kalin Mintchev <ka...@el.net>.


it's kinda urgent. i'd appreciate any help i can get..

thanks..


On Thu, 25 Mar 2004, Kalin Mintchev wrote:

>
>
> hi all,
>
> some problems with AddDefaultCharset
>
> i'm trying to use the AddDefaultCharset in apache 1.3 conf to set the
> charset to gb2312 - simple chinese...
>
> this is how i do it:
>
> <Directory /web/htdocs/ch/ >
>         AddDefaultCharset gb2312
> </Directory>
>
> it doesn't work.
>
> here are the to examples. same pages:
>
> from my server:
> http://danwen.com/ch/test.html
>
> and the same page from ch.yahoo.com:
> http://cn.sports.yahoo.com/basketball/nba/
>
> they don't look the same.
>
> the mime types however are the same. if i take the mime type off my page
> i get garbage like this:
> http://danwen.com/ch/test2.html
>
> which means the AddDefaultCharset doesn't work....
>
> can anybody explain...
>
> thanks...
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org