General discussion on installation and configuration of SOGo

Text archives Help


[SOGo] Set Content-Type for text/html to utf-8 by default


Chronological Thread 
  • From: Anthony Callegaro < >
  • To:
  • Subject: [SOGo] Set Content-Type for text/html to utf-8 by default
  • Date: Wed, 04 Jan 2012 14:57:21 +0000

Hey there,

We switch from Apache to Nginx some months ago and everything seemed to
be fine, but I recently noticed that our French customers had some
encoding display issue. When setting Sogo's Language to French I realize
that the sent folders "Envoyés" was displayed incorrectly as well as all
the accentuated names in the mail list. The preview pane however is fine.

After some investigation it seems that Sogo does not set the charset for
most of its text content (css/html). Apache with the AddDefaultCharset
directive didn't have the issue but nginx is behaving differently.

I tried to force the charset to utf-8 but it seems that nginx will only
modify the charset returned and won't add one if it is empty. I tried :

charset utf-8;
override_charset on;

or even adding the following :

charset_map iso-8859-1 utf-8 {}
source_charset iso-8859-1;

In Firefox the lack of content-type is defaulted to iso8859-1. Customers
using Chrome are fine as it default to utf-8.

I thought this could be set in GNUStep but after grep-ing through the
Sogo code I could see that headers are set explicitly.

Did anybody encountered the same issue ?

Is there a hidden GNUStep/SOGo parameter to change that behaviour ?

So far I think I tried everything possible on the Nginx side :
- default charset : doesn't change as charset is empty
- proxy_set_header : only able to modify headers passed to the remote host
- proxy_hide_header : can not be use in a condition
- add_header : can only add a header a can't modify them.
- more_set_headers : if it works that should be the one I need but it
require to re-compile nginx which I would like to do on a last resort.

Is there a particular reason why Sogo does not set the charset for HTML
output ?

Thanks in advance
LeTic

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.18.

Top of page