httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Abele <e...@codefaktor.de>
Subject Problems with Korean custom error messages
Date Sat, 05 Oct 2002 15:20:17 GMT
Jaeho Shin wrote:

> Well a few days ago, I've upgraded my Apache to 2.0.42, and found that
> each translations in the custom error pages have started to use their
> own charset and language codes. So I appended my Korean messages to them
> in EUC-KR and added some charset and language code settings. Everything
> looks fine now. Well, the error/*.var files will get uglier and uglier
> as Japanese and Chinese or other languages get added to them, since
> nobody will be able to see all the translations correctly in a single
> charset/encoding. But anyhow, it's not bad for users. :)
> 
> I'll attach my new patch for 2.0.42.
> Just do the patch from the parent directory of the error directory.

Hi Jaeho,

thanks for your contribution, but while I was on the way committing 
this, I encountered some problems with it.

It seems that the generated HTTP output headers are missing the charset 
which is set in the type-map file ('Content-type: text/html; 
charset=EUC-KR'). Therefore the error-page isn't displayed with the 
desired charset in the browser.

For example when requesting a non-existent document with an 
'Accept-Language: ko' header field, the expected korean error message is 
returned but without any charset definition in the returned Content-Type 
header-field:

GET /nonsense HTTP/1.1
Host: 192.168.100.201
Accept-Language: ko

HTTP/1.1 404 Not Found
Date: Sat, 05 Oct 2002 14:45:54 GMT
Server: Apache/2.0.44-dev (Unix)
Vary: accept-language,accept-charset
Accept-Ranges: bytes
Transfer-Encoding: chunked
Content-Type: text/html

<?xml version="1.0" encoding="EUC-KR"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<title>°?Ã? ?øÀ?!</title>
...

This of course only happens if no AddDefaultCharset is used in the conf; 
otherwise the  configured default charset will show up in the returned 
Content-Type header (e.g. 'Content-Type: text/html; charset=ISO-8859-1').

Hmmm. perhaps we should take this over to the dev-list. Joshua, what do 
you think about this? Am I missing something here? Any ideas appreciated...

BTW, saving one of Jaeho's patched files in a single ssi-enabled doc 
without the type-map stuff (for example named korean.shtml.euc-kr), 
results in a correctly displayed page with the correct charset-headers.

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message