[Bug 1258546] Re: Apache2 defaults to the wrong character set, it should be UTF-8
Robie Basak
1258546 at bugs.launchpad.net
Mon Dec 9 15:29:37 UTC 2013
> If the default encoding is left alone, Apache serves it up as
"windows-1252" and then UTF-8 encoded letters come out as garbage like
this: åäöÅÄÖéÉ
I do not see this behaviour:
root at trusty:/var/www# xxd test.txt
0000000: 5363 6872 c3b6 6469 6e67 6572 2773 2043 Schr..dinger's C
0000010: 6174 0a at.
root at trusty:/var/www# wget -S -O/dev/null http://localhost/test.txt
--2013-12-09 15:26:28-- http://localhost/test.txt
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Mon, 09 Dec 2013 15:26:28 GMT
Server: Apache/2.4.6 (Ubuntu)
Last-Modified: Mon, 09 Dec 2013 12:19:37 GMT
ETag: "13-4ed1902654840"
Accept-Ranges: bytes
Content-Length: 19
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/plain
Length: 19 [text/plain]
Saving to: ‘/dev/null’
100%[=============================================================================>]
19 --.-K/s in 0s
2013-12-09 15:26:28 (1.52 MB/s) - ‘/dev/null’ saved [19/19]
root at trusty:/var/www#
Here, Apache is just not setting an encoding. It never claims
"windows-1252".
> Apache has a defaut encoding.
As you can see from the headers, this does not appear to be true. I can
understand that perhaps it does in other circumstances that I haven't
been able to test. If this is true, please can you provide steps to
reproduce?
> It's easy to fix by AddDefaultCharset to the configuration. However,
it would be great if Apache worked with non-English languages out of the
box, especially when the locale is set so.
I appreciate that there is a case to perhaps provide a default
AddDefaultCharset that matches the system locale, but unfortunately it's
not simple since the system locale may not match the encoding of the
files you expect to serve from /var/www. This is a tricky issue, and one
I think would be better addressed in Debian or upstream than for Ubuntu
to diverge from Debian and upstream on this.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in Ubuntu.
https://bugs.launchpad.net/bugs/1258546
Title:
Apache2 defaults to the wrong character set, it should be UTF-8
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1258546/+subscriptions
More information about the Ubuntu-server-bugs
mailing list