You are not logged in.
Pages: 1
I am using glpi 0.71.2, php 5.1.6, mysql 4.1
Firstly mail gateway told me mbstring extension not installed and I found some functions
mb_list_encodings() not supported by php4 so I upgraded to php5
the warning message has gone then.
Well after that I use outlook to send email with charset GB2312 (Chinese) to create the ticket.
then I found the ticket created by my mail was decoded as iso-8859-1
After that I checked inc/mailgate.class.php I found this
function decodeMimeString($mimeStr, $inputCharset='utf-8', $targetCharset='utf-8', $fallbackCharset='iso-8859-1') {
if (function_exists('mb_list_encodings')&&function_exists('mb_convert_encoding')){
$encodings=$this->mb_list_lowerencodings();
$inputCharset=strtolower($inputCharset);
$targetCharset=strtolower($targetCharset);
$fallbackCharset=strtolower($fallbackCharset)
So I changed iso-8859-1 to cp936 and then euc-cn (which supported by mbstring)
function decodeMimeString($mimeStr, $inputCharset='utf-8', $targetCharset='utf-8', $fallbackCharset='cp936')
Now the title of the ticket in tracking section displays correctly.
But the mail body still coded as iso-8859-1
I cannot find why this happened, anyone?
GLPI 0.71.2, Apache 2.0.52, php 5.1.6, mysql 4.1.20
Offline
BTW, the Chinese translation really sucks, I would like to make a proper version for you guys after I'm done with the initial setup
GLPI 0.71.2, Apache 2.0.52, php 5.1.6, mysql 4.1.20
Offline
Problem resolved by modifying some codes:
$tkt['contents']= utf8_encoding($body);
to
$tkt['contents']= $this->decodeMimeString($body); //this will use the function DecodeMineString again. Otherwise all contents will be dealt as iso-8859-1
Hope this could help somebody
Last edited by rayz0r (2008-11-27 08:15:50)
GLPI 0.71.2, Apache 2.0.52, php 5.1.6, mysql 4.1.20
Offline
Thanks for the return. I move the thread in bug category.
For the translation, please asking for an access to the online translation tool (cf website)
JMD / Jean-Mathieu Doléans - Glpi-project.org - Association Indepnet
Apportez votre pierre au projet GLPI : Soutenir
Offline
Pages: 1