[Mantis 1.1.1] - French encoding character in email notifica

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
jlvila
Posts: 4
Joined: 24 Apr 2006, 15:35

[Mantis 1.1.1] - French encoding character in email notifica

Post by jlvila »

Hi all,
We just install the new version of Mantis 1.1.1 (W2003/fr + PHP5.1.4).
We have a problem with character encoding in email message.
The behavior seems to be random :
Sometime, we receive the correct character encoding : "Le bogue suivant a été assigné. " (Sorry, the message is in franch of course ;-)
and sometime, we receive a wrong character encoding : "Le bogue suivant a été assigné. " (This is an UTF8 character read with iso-8859-x stream !!!)

What's wrong ? Is it dependent of the reporter ?
I see 2 files in lang (strings_french.txt which is in UTF8 encoding and strings_french_8859-15.txt), how Mantis select the encoding ? based on reporter browser configuration ?

thanks for any help,
Jean-Louis
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Re: [Mantis 1.1.1] - French encoding character in email notifica

Post by deboutv »

Do you compare emails with the same mailer? I mean some mailers don't handle the charset encoding very well.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
jlvila
Posts: 4
Joined: 24 Apr 2006, 15:35

Re: [Mantis 1.1.1] - French encoding character in email notifica

Post by jlvila »

More than the same mailer, it's the same instance !!!! (Outlook 2003), see the screenshot in attachment !!!
I give you the header which cointains the header (It's the same Mantis server). Sometime it's UTF8 or empty, qutoe-printabled or not, it seems to be random !!!

The header with uncorrect encoding is :
=================================
Microsoft Mail Internet Headers Version 2.0
Received: from ext1.sword-group.com ([10.1.3.26]) by sword-group.com with Microsoft SMTPSVC(6.0.3790.3959);
Thu, 31 Jan 2008 09:49:13 +0100
Date: Thu, 31 Jan 2008 09:49:13 +0100
Return-Path: bug@lllllll.com
To: jbug@lllllll.com
From: "bug@lllllll.com" <bug@lllllll.com>
Subject: =??Q?[SWL/PAH_-_Module_ELABORATION_0012679]:_Saisie_des_types_de_v=C3=A9h?=
=??Q?icules?=

Message-ID: <49b00670aab89f774125eb5aec7b4769@ext1.sword-group.com>
X-Priority:
X-Mailer: PHPMailer [version 1.73]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=""
X-OriginalArrivalTime: 31 Jan 2008 08:49:13.0659 (UTC) FILETIME=[278318B0:01C863E6]

The correct is :
============
Microsoft Mail Internet Headers Version 2.0
Received: from ext1.sword-group.com ([10.1.3.26]) by sword-group.com with Microsoft SMTPSVC(6.0.3790.3959);
Thu, 31 Jan 2008 09:49:10 +0100
Date: Thu, 31 Jan 2008 09:49:10 +0100
Return-Path: bug@lllllll.com
To: jbug@lllllll.com
From: "bug@lllllll.com" <bug@lllllll.com>
Subject: [SWL/P2-MAO 0012542]: Correspondance Duree entre Article-Gamme et Process_Pesee
Message-ID: <35142c74c8cdd3c686e9e2a536bf6a67@ext1.sword-group.com>
X-Priority: 3
X-Mailer: PHPMailer [version 1.73]
keywords: [SWL/P2-MAO] Gestion des articles
In-Reply-To: <038b2cd862b9992a072821d4e5b63913>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
X-OriginalArrivalTime: 31 Jan 2008 08:49:10.0628 (UTC) FILETIME=[25B49A40:01C863E6]
Attachments
enconding_character.gif
enconding_character.gif (3.25 KiB) Viewed 4212 times
sduteis
Posts: 1
Joined: 06 Mar 2008, 17:16

Re: [Mantis 1.1.1] - French encoding character in email notifica

Post by sduteis »

According to /core/email_api.php, the charset is taken from the user langage current setting :

Code: Select all

$t_email_data->metadata['charset'] =  lang_get( 'charset', lang_get_current() ); 
Charset variables are defined in /lang/string_[language].txt . for string_french.txt

Code: Select all

$s_charset = 'utf-8';
Language settings are set in config_inc.php . Is $g_default_language set to auto ???
Maybe you could force usage charset encoding this way :

Code: Select all

# --- language settings -----------
        # If the language is set to 'auto', the actual
        # language is determined by the user agent (web browser)
        # language preference.
$g_default_language             = 'french';
# list the choices that the users are allowed to choose
$g_language_choices_arr = array(
'french'
);
# Fallback for automatic language selection
        $g_fallback_language    = 'french';
Hope it helps
Post Reply