Author |
|
birkettm
Joined: 27 Apr 2006 Posts: 20
|
Posted: Thu 03 Jan '08 18:28 Post subject: Output charset ISO-8859-1 not supported. |
|
|
Hi.
Keep getting the above error in my error.log file. Surely it cant be true that Apache doesnt support the characterset ISO-8859-1? Do i have to switch it on or something? Currently all the sites are being served in UTF-8 so im getting some "random" characters.
Any help appreciated.
Cheers
Marc |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Thu 03 Jan '08 19:40 Post subject: |
|
|
Nowhere near enough information to help you.
See the Forum Rules for some advice about what to include (and not include) in your question.
FYI - The Apache 2.2.6 source code for Windows doesn't contain the string "Output charset" anywhere.
It's best to cut and paste the exact line from your error.log.
Maybe it was "output charset" rather than "Output charset". Little things like this make a big difference in getting an answer.
-tom- |
|
Back to top |
|
birkettm
Joined: 27 Apr 2006 Posts: 20
|
Posted: Fri 04 Jan '08 11:23 Post subject: More Information |
|
|
Thanks for the quick response.
I am using mod_proxy_html as a reverse proxy for various websites ran on IIS or Plone/Zope. While this works for the most part I am having massive problems with Latin Character A Circumflex appearing on some pages. The particular pages i am having problems with have been authored in MS-Frontpage and so have a charset set as Windows-1252. Example here http://www.northumberlandcaretrust.nhs.uk/healthdev/
The errors i am getting in my log file are commonly:
[Fri Jan 04 08:55:03 2008] [warn] [client x.xx.xxx.x] No usable charset information; using configuration default
and
[Fri Jan 04 09:17:39 2008] [warn] [client x.xx.xxx.x] Output charset ISO-8859-1 not supported. Falling back to UTF-8, referer: http://www.mydomianname.com
I believe this is something to do with the mod proxy config which is:
Code: | ProxyRequests off
SetOutputFilter proxy-html
LimitInternalRecursion 10
#proxyhtml setup
ProxyHTMLExtended On
ProxyHTMLMeta On
ProxyHTMLStripComments Off
ProxyHTMLLogVerbose On
ProxyHTMLCharsetAlias ISO-8859-1 Windows-1252
ProxyHTMLCharsetDefault ISO-8859-1
ProxyHTMLCharsetOut ISO-8859-1 |
But this doesnt seem to apply to whether ths ISO-8859-1 Charset is suppported or not. I installed apache using apache_2.2.6-win32-x86-no_ssl.msi
Anything else i can tell you?
Thanks
Marc |
|
Back to top |
|
birkettm
Joined: 27 Apr 2006 Posts: 20
|
Posted: Fri 04 Jan '08 11:46 Post subject: AddDefaultCharset ISO-8859-1 |
|
|
Adding the above line to httpd.conf seems to have removed the rogue characters on the output. However i am still getting:
[Fri Jan 04 09:46:00 2008] [warn] [client xx.xx.xxx.xx] Output charset ISO-8859-1 not supported. Falling back to UTF-8
In my log file which i would like to fix. Suggestions still welcome....
Ta! |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Fri 04 Jan '08 15:57 Post subject: |
|
|
The error message is from mod_proxy_html. That's why it wasn't in the Apache source code.
You might do better if you remove the ProxyHTMLCharsetOut directive from your configuration. This will let mod_proxy_html convert the remote response to UTF-8 from whatever the remote site uses. The docs for mod_proxy_html say that ProxyHTMLCharsetOut "should not normally be used".
Alternatively, you can use: Code: | ProxyHTMLCharsetOut * | which will preserve the character set from the remote site.
Since I don't know the URL that you proxy to, I can't test this myself. I would be curious to know if removing ProxyHTMLCharsetOut helps.
-tom- |
|
Back to top |
|
birkettm
Joined: 27 Apr 2006 Posts: 20
|
Posted: Fri 04 Jan '08 16:11 Post subject: |
|
|
Hi.
I didnt notice that caveat with ProxyHTMLCharsetOut. I have commented out this line and set the default charset to UTF-8 and it seems to have removed the charset specific errors:
[Fri Jan 04 09:17:39 2008] [warn] [client x.xx.xxx.x] Output charset ISO-8859-1 not supported. Falling back to UTF-8, referer: http://www.mydomianname.com
However im still getting this one:
[Fri Jan 04 14:09:29 2008] [warn] [client 194.176.105.47] No usable charset information; using configuration default
Am i to assume that this is just the result of various windows people stating a Windows-1252 charset and this is just Apache dealing with it?
I have also switched verbose logging off.
Many thanks for your help. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Fri 04 Jan '08 16:32 Post subject: |
|
|
The "No usable charset information" warning means that the remote host sent no character set information at all. mod_proxy_html needed to default to the character set that you specified with ProxyHTMLCharsetDefault.
I'm surprised that this is a "warning" message instead of just an "info" message - but that's the way it is coded in mod_proxy_html.
If you compile mod_proxy_html from the source code yourself, you could change this in mod_proxy_html.c line 851.
Change: Code: | /* Use configuration default as a last resort */
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"No usable charset information; using configuration default") ; | to: Code: | /* Use configuration default as a last resort */
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
"No usable charset information; using configuration default") ; |
-tom- |
|
Back to top |
|
birkettm
Joined: 27 Apr 2006 Posts: 20
|
Posted: Tue 08 Jan '08 17:19 Post subject: |
|
|
Cheers!
Left it as it was eventually. Will just alter the loglevel when im ready.
Thanks for your help.
Marc |
|
Back to top |
|