Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've tried the Simplified Chinese translation in UTF-8 encoding without
major problem against SM-1.4.15-rc1.  Some of the source files still need
to be tweaked to make Chinese displayed properly, as in SM-1.4.13. The
SM-1.4.15-rc1 still has problem forward or reply utf-8 encoded Chinese, as
described in
http://sourceforge.net/mailarchive/message.php?msg_id=16537240.post%40talk.nabble.com

Test environment:
SM: 1.4.15-rc1 with squirrelmail-decode-1.2, no plugins.
PHP: php-5.1.6-15.el5, php-mbstring
Web server: Apache httpd-2.2.3-11.el5_1.centos.3, config "DefaultLanguage
UTF-8"
IMAP server: Dovecot-1.0-1.2.rc15.el5
SMTP server: postfix-2.3.3-2.el5.centos.mysql_pgsql
OS: Centos-5.1 with latest patch, kernel-2.6.18-53.1.19.el5,
$LANG=zh_CN.UTF-8
Install method: SM-1.4.15-rc1 and SM-decode-1.2 installed manually. The
utf-8 version po and mo files copied to
{smpath}/locale/zh_CN/LC_MESSAGES/.  Everything else is distro rpm
package.
Browsers tried: IE7-5.50.4134.0600@XP sp2, IE6-6.0.2800.1106sp1@W2k sp4,
Firefox-3.0b5@Ubuntu Hardy
--

The more I learn, the more I'm aware of my ignorance.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Tomas Kuliavas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Frank Wang-3 wrote:
I've tried the Simplified Chinese translation in UTF-8 encoding without
major problem against SM-1.4.15-rc1.  Some of the source files still need
to be tweaked to make Chinese displayed properly, as in SM-1.4.13. The
SM-1.4.15-rc1 still has problem forward or reply utf-8 encoded Chinese, as
described in
http://sourceforge.net/mailarchive/message.php?msg_id=16537240.post%40talk.nabble.com
Linked email is not in Chinese. RFC 2045 chapter 6. If email is in Chinese, problem is not in SquirrelMail, but in that Python script.

--
Tomas

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Fredrik Jervfors-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I've tried the Simplified Chinese translation in UTF-8 encoding without
> major problem against SM-1.4.15-rc1.  Some of the source files still need
> to be tweaked to make Chinese displayed properly, as in SM-1.4.13. The
> SM-1.4.15-rc1 still has problem forward or reply utf-8 encoded Chinese,
> as described in
> http://sourceforge.net/mailarchive/message.php?msg_id=16537240.post%40tal
> k.nabble.com
>
> Test environment:
> SM: 1.4.15-rc1 with squirrelmail-decode-1.2, no plugins.
> PHP: php-5.1.6-15.el5, php-mbstring
> Web server: Apache httpd-2.2.3-11.el5_1.centos.3, config "DefaultLanguage
> UTF-8"
> IMAP server: Dovecot-1.0-1.2.rc15.el5
> SMTP server: postfix-2.3.3-2.el5.centos.mysql_pgsql
> OS: Centos-5.1 with latest patch, kernel-2.6.18-53.1.19.el5,
> $LANG=zh_CN.UTF-8
> Install method: SM-1.4.15-rc1 and SM-decode-1.2 installed manually. The
> utf-8 version po and mo files copied to {smpath}/locale/zh_CN/LC_MESSAGES/.
> Everything else is distro rpm
> package. Browsers tried: IE7-5.50.4134.0600@XP sp2,
> IE6-6.0.2800.1106sp1@W2k sp4,
> Firefox-3.0b5@Ubuntu Hardy

I interpret this as a a consensus for switching Simplified Chinese to
UTF-8, and I'm going to do it tonight before the release of 1.4.15. If
this is wrong, please get back to the list in a new thread describing any
problems you might have. The thread referred doesn't contain a test mail,
so I'm assuming that the problem was a badly formatted mail and not the
code in SquirrelMail. If I'm wrong, please give me something to test with
(although I might need help doing these kinds of tests, since I'm not as
good at this as Tomas Kuliavas).

Sincerely,
Fredrik

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I interpret this as a a consensus for switching Simplified Chinese to
> UTF-8, and I'm going to do it tonight before the release of 1.4.15. If
> this is wrong, please get back to the list in a new thread describing any
> problems you might have.
I'm currently working on the new translation by Dongsheng Song to solve
the inconsistency between us. This probably will take a little while. And
if you'll upload the utf-8 version tonight, please don't forget converting
all the help files too.

> The thread referred doesn't contain a test mail,
> so I'm assuming that the problem was a badly formatted mail and not the
> code in SquirrelMail. If I'm wrong, please give me something to test with
> (although I might need help doing these kinds of tests, since I'm not as
> good at this as Tomas Kuliavas).
I wrote a test mail from the Evolution 2.22.1 whose default encoding is
Unicode (UTF-8). The mail can be viewed correctly but the content in reply
or forward was corrupted. Subject was alright in all cases though. The
headers and screen shot are attached. The test mail is also sent to your
mail.



Return-Path: <yafrank@...>
X-Original-To: wg@...
Delivered-To: wg@...
Received: from m5-142.126.com (m5-142.126.com [202.108.5.142])
     by bak.yaandaily.com.cn (Postfix) with SMTP id 9CAF1A90006
     for <wg@...>; Tue, 20 May 2008 11:49:33 +0800 (CST)
Received: from [192.168.1.250] (unknown [61.157.226.146])
     by smtp5 (Coremail) with SMTP id jtKowLB7HRg9SjJIU5ZPEg==.42884S2;
     Tue, 20 May 2008 11:49:17 +0800 (CST)
Subject: =?gb2312?Q?=D6=D0=CE=C4=D6=F7=CC=E2=B2=E2=CA=D4=2FChine?=
     =?gb2312?Q?se?= subject test
From: Frank Wang <yafrank@...>
To: wg@...
Content-Type: text/plain; charset=UTF-8
Organization: Ya'an Daily
Date: Tue, 20 May 2008 11:49:11 +0800
Message-Id: <1211255351.8471.2.camel@yad>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.1
Content-Transfer-Encoding: 8bit
X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUUYxn0WfASr-VFAUDa7-sFnT
     9fnUUIcSsGvfJTRUUUjeAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl14x267AKxVWUJVW8JwAF
     xVCF77xC6IxKo4kEV4yl1I0EscIYIxCEI4klw4CSwwAFIxvE14AKwVWUJVWUGwAq048E62
     0vw7xCY7CE4x8GYI0EYx1lYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j
     6r4UM4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwAC6xAIw28IcVAK0I8IjxAxMx02cVAKzw
     CY02Avz4vE14v_Gr4lc2IjII80xcxEwVWxJVW3JwCF72vE52k0Y41l4IxY628EI7kG0VAY
     aI8xMI8E67AF67kF1VAFwI0_Jr0_Jrylb7Iv0xC_Jr1lb4IE77IF4bIYCTnIWIevJa73Uj
     IFyTuYvj4RRMKtUUUUU
X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on bak.yaandaily.com.cn
X-Virus-Status: Clean
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

sm-1.4.5-view-ok.png (146K) Download Attachment
sm-1.4.15-fwd-corrupt.png (153K) Download Attachment
sm-1.4.15-reply-corrupt.png (146K) Download Attachment

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I interpret this as a a consensus for switching Simplified Chinese to
> UTF-8, and I'm going to do it tonight before the release of 1.4.15. If
> this is wrong, please get back to the list in a new thread describing any
> problems you might have.
I'm currently working on the new translation by Dongsheng Song to solve
the inconsistency between us. This probably will take a little while. And
if you'll upload the utf-8 version tonight, please don't forget converting
all the help files too.

> The thread referred doesn't contain a test mail,
> so I'm assuming that the problem was a badly formatted mail and not the
> code in SquirrelMail. If I'm wrong, please give me something to test with
> (although I might need help doing these kinds of tests, since I'm not as
> good at this as Tomas Kuliavas).
I wrote a test mail from the Evolution 2.22.1 whose default encoding is
Unicode (UTF-8). The mail can be viewed correctly but the content in reply
or forward was corrupted. Subject was alright in all cases though. The
headers and screen shot are attached. The test mail is also sent to your
mail.



Return-Path: <yafrank@...>
X-Original-To: wg@...
Delivered-To: wg@...
Received: from m5-142.126.com (m5-142.126.com [202.108.5.142])
     by bak.yaandaily.com.cn (Postfix) with SMTP id 9CAF1A90006
     for <wg@...>; Tue, 20 May 2008 11:49:33 +0800 (CST)
Received: from [192.168.1.250] (unknown [61.157.226.146])
     by smtp5 (Coremail) with SMTP id jtKowLB7HRg9SjJIU5ZPEg==.42884S2;
     Tue, 20 May 2008 11:49:17 +0800 (CST)
Subject: =?gb2312?Q?=D6=D0=CE=C4=D6=F7=CC=E2=B2=E2=CA=D4=2FChine?=
     =?gb2312?Q?se?= subject test
From: Frank Wang <yafrank@...>
To: wg@...
Content-Type: text/plain; charset=UTF-8
Organization: Ya'an Daily
Date: Tue, 20 May 2008 11:49:11 +0800
Message-Id: <1211255351.8471.2.camel@yad>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.1
Content-Transfer-Encoding: 8bit
X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUUYxn0WfASr-VFAUDa7-sFnT
     9fnUUIcSsGvfJTRUUUjeAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl14x267AKxVWUJVW8JwAF
     xVCF77xC6IxKo4kEV4yl1I0EscIYIxCEI4klw4CSwwAFIxvE14AKwVWUJVWUGwAq048E62
     0vw7xCY7CE4x8GYI0EYx1lYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j
     6r4UM4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwAC6xAIw28IcVAK0I8IjxAxMx02cVAKzw
     CY02Avz4vE14v_Gr4lc2IjII80xcxEwVWxJVW3JwCF72vE52k0Y41l4IxY628EI7kG0VAY
     aI8xMI8E67AF67kF1VAFwI0_Jr0_Jrylb7Iv0xC_Jr1lb4IE77IF4bIYCTnIWIevJa73Uj
     IFyTuYvj4RRMKtUUUUU
X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on bak.yaandaily.com.cn
X-Virus-Status: Clean

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

sm-1.4.5-view-ok.png (53K) Download Attachment
sm-1.4.15-fwd-corrupt.png (60K) Download Attachment
sm-1.4.15-reply-corrupt.png (52K) Download Attachment

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Tomas Kuliavas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> The thread referred doesn't contain a test mail,
>> so I'm assuming that the problem was a badly formatted mail and not the
>> code in SquirrelMail. If I'm wrong, please give me something to test
>> with
>> (although I might need help doing these kinds of tests, since I'm not as
>> good at this as Tomas Kuliavas).
> I wrote a test mail from the Evolution 2.22.1 whose default encoding is
> Unicode (UTF-8). The mail can be viewed correctly but the content in reply
> or forward was corrupted. Subject was alright in all cases though. The
> headers and screen shot are attached. The test mail is also sent to your
> mail.

Could you test your PHP settings? See
http://www.squirrelmail.org/wiki/TestPHPSettings

I need information about PHP version, list of enabled extensions and
mbstring extension settings.


--
Tomas



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Parent Message unknown Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Miro Konecny :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>I wrote a test mail from the Evolution 2.22.1 whose default encoding is
>Unicode (UTF-8). The mail can be viewed correctly but the content in reply
>or forward was corrupted. Subject was alright in all cases though. The
>headers and screen shot are attached. The test mail is also sent to your
>mail.


The subject of your test mail is encoded in gb2312, body the body is in utf-8 (?)
As the subject is displayed correctly, I assume your SM still uses gb2312
and not utf-8 for simplified chinese.

When forward/reply fails, it means the conversion was not performed.
Are you *absolutely* sure that you correctly modified functions/i18n.php
and replaced both locale and charset with utf-8 like this:

$languages['zh_CN']['NAME']    = 'Chinese Simp';
$languages['zh_CN']['CHARSET'] = 'utf-8';
$languages['zh_CN']['LOCALE']  = 'zh_CN.UTF-8';
$languages['cn']['ALIAS']      = 'zh_CN';

Please also check if your browser thinks the webpage is in utf-8 encoding.

Regards,
Miro


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The subject of your test mail is encoded in gb2312, body the body is in

> utf-8 (?)
> As the subject is displayed correctly, I assume your SM still uses gb2312
> and not utf-8 for simplified chinese.
>
> When forward/reply fails, it means the conversion was not performed.
> Are you *absolutely* sure that you correctly modified functions/i18n.php
> and replaced both locale and charset with utf-8 like this:
>
> $languages['zh_CN']['NAME']    = 'Chinese Simp';
> $languages['zh_CN']['CHARSET'] = 'utf-8';
> $languages['zh_CN']['LOCALE']  = 'zh_CN.UTF-8';
> $languages['cn']['ALIAS']      = 'zh_CN';
>
> Please also check if your browser thinks the webpage is in utf-8 encoding.
>
I didn't modify any of the source file in SM-1.4.15-rc1 or SM-decode-1.2.
All the options was set by conf.pl. The default_charset was set to UTF-8
in config.php, and the po file is UTF-8 encoded. I'll test the modified
i18n.php with everything else unchanged right now.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

config.php (10K) Download Attachment

Parent Message unknown Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I need information about PHP version, list of enabled extensions and
mbstring extension settings.
>
It's attached.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

phpinfo.tar.gz (19K) Download Attachment

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> As the subject is displayed correctly, I assume your SM still uses gb2312

> and not utf-8 for simplified chinese.
>
> When forward/reply fails, it means the conversion was not performed.
> Are you *absolutely* sure that you correctly modified functions/i18n.php
> and replaced both locale and charset with utf-8 like this:
>
> $languages['zh_CN']['NAME']    = 'Chinese Simp';
> $languages['zh_CN']['CHARSET'] = 'utf-8';
> $languages['zh_CN']['LOCALE']  = 'zh_CN.UTF-8';
> $languages['cn']['ALIAS']      = 'zh_CN';
>
> Please also check if your browser thinks the webpage is in utf-8 encoding.
>
You're right. I didn't notice that all the browsers treated the webpage in
gb2312 encoding before I modified functions/i18n.php as suggested above.
It's utf-8 now.
With the new i18n.php, the view/reply/forward works as expected between SM
and Evolution. There's no major problem except followings:
1. Long Chinese line will not wrap as in SM-1.4.13
   I still have to modify functions/mime.php to work around it.
[yarb@bak sm-1.4.15]$ diff -u ./functions/mime.php.orig ./functions/mime.php
--- ./functions/mime.php.orig 2008-05-19 14:21:11.000000000 +0800
+++ ./functions/mime.php 2008-05-20 22:31:48.000000000 +0800
@@ -294,7 +294,7 @@

         $body_ary[$i] = $line;
     }
-    $body = '<pre>' . implode("\n", $body_ary) . '</pre>';
+    $body = implode("<br>\n", $body_ary);
 }

 /**

2. Chinese text attachment will be viewed in us-ascii charset, thus
corrupted, as in SM-1.4.13
   The work around was forcing it using gb18030 encoding cause most plain
text file here are covered by that. Of course, it can't make UTF-8
encoded Chinese text displayed correctly.
[yarb@bak sm-1.4.15]$ diff -u ./src/view_text.php.orig ./src/view_text.php
--- ./src/view_text.php.orig 2008-05-19 14:05:46.000000000 +0800
+++ ./src/view_text.php 2008-05-20 21:22:26.000000000 +0800
@@ -58,6 +58,7 @@
 $type0    = $header->type0;
 $type1    = $header->type1;
 $charset  = $header->getParameter('charset');
+if ( $charset == 'us-ascii' ) { $charset  = 'gb18030'; }
 $encoding = strtolower($header->encoding);

 $msg_url   = 'read_body.php?' . $QUERY_STRING;

3. I need to find a way to convert exist mails in gb2312 encoding to utf-8
ones. They're displayed corrupted in the utf-8 environment now.




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Fredrik Jervfors-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> As the subject is displayed correctly, I assume your SM still uses
>> gb2312 and not utf-8 for simplified chinese.
>>
>> When forward/reply fails, it means the conversion was not performed.
>> Are you *absolutely* sure that you correctly modified functions/i18n.php
>>  and replaced both locale and charset with utf-8 like this:
>>
>> $languages['zh_CN']['NAME']    = 'Chinese Simp';
>> $languages['zh_CN']['CHARSET'] = 'utf-8';
>> $languages['zh_CN']['LOCALE']  = 'zh_CN.UTF-8';
>> $languages['cn']['ALIAS']      = 'zh_CN';
>>
>> Please also check if your browser thinks the webpage is in utf-8
>> encoding.
>
> You're right. I didn't notice that all the browsers treated the webpage
> in gb2312 encoding before I modified functions/i18n.php as suggested
> above. It's utf-8 now.

That shouldn't matter if you have the decoding package installed. Do you
have it?

> With the new i18n.php, the view/reply/forward works as expected between SM
> and Evolution. There's no major problem except followings:
>
> 1. Long Chinese line will not wrap as in SM-1.4.13
> I still have to modify functions/mime.php to work around it.
> [yarb@bak sm-1.4.15]$ diff -u ./functions/mime.php.orig
> ./functions/mime.php
> --- ./functions/mime.php.orig 2008-05-19 14:21:11.000000000 +0800
> +++ ./functions/mime.php 2008-05-20 22:31:48.000000000 +0800
> @@ -294,7 +294,7 @@
>
>
> $body_ary[$i] = $line;
> }
> -    $body = '<pre>' . implode("\n", $body_ary) . '</pre>';
> +    $body = implode("<br>\n", $body_ary);
> }
>
>
> /**
>
> 2. Chinese text attachment will be viewed in us-ascii charset, thus
> corrupted, as in SM-1.4.13 The work around was forcing it using gb18030
> encoding cause most plain text file here are covered by that. Of course,
> it can't make UTF-8 encoded Chinese text displayed correctly. [yarb@bak
> sm-1.4.15]$ diff -u ./src/view_text.php.orig ./src/view_text.php ---
> ./src/view_text.php.orig 2008-05-19 14:05:46.000000000 +0800
> +++ ./src/view_text.php 2008-05-20 21:22:26.000000000 +0800
> @@ -58,6 +58,7 @@
> $type0    = $header->type0;
> $type1    = $header->type1;
> $charset  = $header->getParameter('charset');
> +if ( $charset == 'us-ascii' ) { $charset  = 'gb18030'; }
> $encoding = strtolower($header->encoding);
>
>
> $msg_url   = 'read_body.php?' . $QUERY_STRING;
>
>
> 3. I need to find a way to convert exist mails in gb2312 encoding to
> utf-8 ones. They're displayed corrupted in the utf-8 environment now.

AFAIK, they shouldn't be if you have the decoding package installed.

SquirrelMail 1.4.15 will most likely be released tomorrow. Should I commit
a switch to UTF-8 for zh_CN or not? You might want to test it more and
then have it in 1.4.16 instead.

Sincerely,
Fredrik

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Tomas Kuliavas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fredrik Jervfors-4 wrote:
>> As the subject is displayed correctly, I assume your SM still uses
>> gb2312 and not utf-8 for simplified chinese.
>>
>> When forward/reply fails, it means the conversion was not performed.
>> Are you *absolutely* sure that you correctly modified functions/i18n.php
>>  and replaced both locale and charset with utf-8 like this:
>>
>> $languages['zh_CN']['NAME']    = 'Chinese Simp';
>> $languages['zh_CN']['CHARSET'] = 'utf-8';
>> $languages['zh_CN']['LOCALE']  = 'zh_CN.UTF-8';
>> $languages['cn']['ALIAS']      = 'zh_CN';
>>
>> Please also check if your browser thinks the webpage is in utf-8
>> encoding.
>
> You're right. I didn't notice that all the browsers treated the webpage
> in gb2312 encoding before I modified functions/i18n.php as suggested
> above. It's utf-8 now.

That shouldn't matter if you have the decoding package installed. Do you
have it?
SquirrelMail encoding functions don't support gb2312, euc-kr and big5 targets. Even if you install extra /de/coding library, you won't improve SquirrelMail /en/coding functions. It matters.
 

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Fredrik Jervfors-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>> As the subject is displayed correctly, I assume your SM still uses
>>>> gb2312 and not utf-8 for simplified chinese.
>>>>
>>>> When forward/reply fails, it means the conversion was not
>>>> performed. Are you *absolutely* sure that you correctly modified
>>>> functions/i18n.php and replaced both locale and charset with utf-8
>>>> like this:
>>>>
>>>> $languages['zh_CN']['NAME']    = 'Chinese Simp';
>>>> $languages['zh_CN']['CHARSET'] = 'utf-8';
>>>> $languages['zh_CN']['LOCALE']  = 'zh_CN.UTF-8';
>>>> $languages['cn']['ALIAS']      = 'zh_CN';
>>>>
>>>> Please also check if your browser thinks the webpage is in utf-8
>>>> encoding.
>>>
>>> You're right. I didn't notice that all the browsers treated the
>>> webpage in gb2312 encoding before I modified functions/i18n.php as
>>> suggested above. It's utf-8 now.
>>
>> That shouldn't matter if you have the decoding package installed. Do
>> you have it?
>
> SquirrelMail encoding functions don't support gb2312, euc-kr and big5
> targets. Even if you install extra /de/coding library, you won't improve
> SquirrelMail /en/coding functions. It matters.

I thought that decoding mails from gb2312 and encoding them in UTF-8 for
display at the page would do the trick.

Sincerely,
Fredrik

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Frank Wang-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> AFAIK, they shouldn't be if you have the decoding package installed.
>
> SquirrelMail 1.4.15 will most likely be released tomorrow. Should I commit
> a switch to UTF-8 for zh_CN or not? You might want to test it more and
> then have it in 1.4.16 instead.
I'm sure the extra decode library was installed.
I forget another problem that the draft/sent/trash folder are displayed in
English as the un-modified SM-1.4.13. Inbox is correctly displayed in
Chinese though. The workaround for the old version was manually modify
config.php in gb18030 encoding editor, and set $trash/sent/draft_folder to
Chinese name of Inbox.trash/sent/draft. The trick doesn't work in
SM-1.4.15-rc1 with utf-8 Chinese translation, they're all question marks
now.
Due to these problems, it's better postpone the utf-8 conversion till next
release.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n

Parent Message unknown Re: Test Simplified Chinese translation in UTF-8 against SM-1.4.15-rc1

by Miro Konecny :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> SquirrelMail encoding functions don't support gb2312, euc-kr and big5
>> targets. Even if you install extra /de/coding library, you won't improve
>> SquirrelMail /en/coding functions. It matters.
>
>I thought that decoding mails from gb2312 and encoding them in UTF-8 for
>display at the page would do the trick.

Yes, when mail is *declared* as beeing in gb2312 charset, it displays
fine in any utf-8 locale.

The problem Frank is seeing is most probably caused by the fact, that
mails were sent in gb2312 without proper MIME headers.

Regards,
Miro




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
List address: squirrelmail-i18n@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.