Open Discussion (#3) - CJK Support (#50) - Message List

CJK Support

Wonderful job!!

LogicMail can render CJK characters in topic of mail, but it cannot render them in body. Would you like to support CJK characters in body of mail? :)

Hm...I think you may need more comprehensive methods to handle CJK character (UTF8 & Native GB2312, for example). I think some JAVA API may be helpful.

  • Message #125

     

  • Message #126

    If LogicMail renders CJK correctly in the headers but not the body, then it is probably a bug/oversight in the text decoding implementation. I can easily implement decoding for anything supported by the BlackBerry API (which means UTF8 and UTF16 should work, but I'm not so sure about GB2312). If you could send me a sample message (raw message source, or just send an e-mail to octo@… that I can view the source of), I can look into why it isn't decoding properly.

    I know some support is already in there, at least general support for base64-encoded unicode, so I'm curious to see what isn't working.

    -Derek

    • Message #127

      The following is the sample message for you:

      易于查找的邮件、进行自我整理的收件箱、功能强大的反垃圾邮件工具和内置的聊天功能。不错吧?欢迎使用 Gmail。

      You may copy & send the message to gmail from your mailbox, and then receive the message in logicmail in BlackBerry.

      And your mail address is octo@...? Would you please give me the complete address? Sorry for my innocence. :)

      For the sending function, the CJK characters in body can be sent to gmail correctly, but the CJK characters in subject is not OK. And the logicmail can display CJK characters correctly in its body when the mail is sent by itself!

      Another error I found is when there is no mailbox and press enter, you will get a Java error.

      Best Regards, Wade

      • Message #128

        Trac hides e-mail addresses unless you are logged in. Another way to say it is: octo [at] logicprobe [dot] org (which you can turn into a real e-mail address)

      • Message #129

        Okay, I think I just reproduced the issue! When I sent an e-mail from Gmail to my test account, using the text you provided, it used the GB2312 charset for the message. The subject displayed just fine, while the body didn't. (Of course I first needed to install a simulator for a Chinese-supporting BlackBerry model)

        The problem was that LogicMail let any charset through for the headers, while it had specific logic to only allow a few charsets (those mentioned in the BlackBerry API documentation) to be used for the message body. I opened ticket #99 for the issue.

        Now for the good news... GB2312 works perfectly on the Chinese-supporting BlackBerry!

        I've posted a fix for the issue in the latest LogicMail 1.0.2 RC build.

        The over-the-air install link:  http://logicmail.sf.net/ota/test/LogicMail.jad

        Let me know if this works for you.

        • Message #133

          just test.

          some Chinese email display right.

          some Chinese email display wrong.

          and the Funambol have not the problem.

        • Message #134

          Wo... Thank you very much for your quick action!! :)

          But since I can not use over-the-air install (I don't activate my embeded browser of blackberry). I can not perform the test for you. But I believe it will be ok if it is ok in simulator. I can install alx from my desktop.

          And I think aston has been able to test it. :) I think it may be depend on encoding of mail server using!!

          Thank you.

          Best Regards, Wade

          • Message #135

            If you want to try the desktop loader, then download and unzip this file:  http://logicmail.sourceforge.net/ota/test/LogicMail-test.zip

            (there are some minor differences in the .cod files between the OTA and desktop-loader approaches, so you'll need this download instead)

            Also, if you can get figure out how to tell aston to provide useful information on his problem, that would be appreciated. (what I really need is the raw source of a message that isn't working, so I can see how it is encoded, and see what LogicMail is doing wrong)

            • Message #136

              I try but ...

              not support all chinese yet.

              • Message #137

                logic email content:

                Dear All

                ¸Õ²Å·¢´íÁË¡­¡­

                ÅàѵÖ÷Ì⣺ÁìÐäµÄ·ç²É

                Åàѵʱ¼ä£º9ÔÂ2ÈÕ¡¢3ÈÕ£¨¼´ÏÂÖÜ2¡¢3£(c)16£º00~20£º30

                ½² ʦ£ºº«Ð¥

                Åàѵ¶ÔÏó£ºÑз¢ÖÐÐÄËùÓÐÔ±¹¤£¨²Î¼Ó¹ýÅàѵµÄÈËÔ±¿É²»²Î¼Ó£(c)

                correct content:

                Dear All 培训主题:领袖的风采 培训时间:8月26日、27日(即下周2、3)4:00~8:30 讲 师: 培训对象:研发中心所有员工(参加过培训的人员可不参加)

                • Message #138

                  aston,

                  Thank you for your information.

                  Hm..., besides copying the text onto forum, I think you can also figure out which email address & server you used to send and receive the wrong email.

                  So octo can test the mail himself, debug the problem & checking the data stream.

                  octo,

                  For the testing, I'm using BlackBerry 7290, I got a error message when installing, but it seemed I can install it onto my BlackBerry, and after installing, I got another error message on the phone...

                  Anyway, I run the program and try to receive the email, hehe... I got the topic, when I opened it to receive body text, I got the text correctly!! :) I'm using GMail. Thank you!!

                  The bad news is, if the email is html email, it seems logicmail refuse to receive it. I wonder if you can call the embeded browse or opera browse to handle such contents. Or you can just display the hyperlink as plain text. It will be better then displaying nothing.:) You may consider it in future development.

                  Thank you very much for your help. And I am looking forward to next release of logicmail. :)

                  Best Regards, Wade

                • Message #139

                  When I ask for the "raw source" of the E-Mail causing the problem, I'm asking for the output of a "View Source" feature of your desktop E-Mail client. It looks something like this:

                  Return-Path: <octo@logicprobe.org>
                  From: Derek Konigsberg <octo@logicprobe.org>
                  To: testuser@test.org
                  Subject: =?utf-8?b?5piT5LqO5p+l5om+55qE6YKu5Lu2?=
                  Date: Thu, 28 Aug 2008 18:47:52 -0400
                  User-Agent: KMail/1.9.10
                  MIME-Version: 1.0
                  Content-Type: text/plain;
                    charset="utf-8"
                  Content-Transfer-Encoding: base64
                  Content-Disposition: inline
                  Message-Id: <200808281847.52321.octo@logicprobe.org>
                  5piT5LqO5p+l5om+55qE6YKu5Lu244CB6L+b6KGM6Ieq5oiR5pW055CG55qE5pS25Lu2566x44CB
                  5Yqf6IO95by65aSn55qE5Y+N5Z6D5Zy+6YKu5Lu25bel5YW35ZKM5YaF572u55qE6IGK5aSp5Yqf
                  6IO944CC5LiN6ZSZ5ZCn77yf5qyi6L+O5L2/55SoIEdtYWls44CCIAotLSAKLS0tLS0tLS0tLS0t
                  LS0tLS0tLS0tLS0tLS0tCkRlcmVrIEtvbmlnc2JlcmcKb2N0b0Bsb2dpY3Byb2JlLm9yZwotLS0t
                  LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0K
                  
                  • Message #165

                    Derek, here is a sample message that may help. Actually I believe it's better to send it as an attachment, as the mail content is actually GB2312 but copy/paste made it UTF8 because of our smart browser ...

                    Return-Path: <pal@mepal.cn>
                    Received: from localhost (localhost [127.0.0.1])
                    by w1 (Postfix) with ESMTP id F0092AF5499
                    for <me@mepal.cn>; Mon, 13 Oct 2008 23:05:33 +0800 (CST)
                    X-Virus-Scanned: amavisd-new at mepal.cn
                    Received: from w1 ([127.0.0.1])
                    by localhost (w1.mepal.cn [127.0.0.1]) (amavisd-new, port 10024)
                    with LMTP id IzGV9YAeugrx for <me@mepal.cn>;
                    Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Received: from mepal.cn (localhost [127.0.0.1])
                    by w1 (Postfix) with ESMTP id C96DCAF5491
                    for <me@mepal.cn>; Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Received: from 123.115.215.202
                    (SquirrelMail authenticated user pal)
                    by mepal.cn with HTTP;
                    Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Message-ID: <58121.123.115.215.202.1223910327.squirrel@mepal.cn>
                    Date: Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Subject: =?gb2312?Q?=CB=AE=BE=A7=F7=BC=F7=C3?=
                    From: pal@mepal.cn
                    To: me@mepal.cn
                    User-Agent: SquirrelMail/1.4.13-1.fc9
                    MIME-Version: 1.0
                    Content-Type: text/plain;charset=gb2312
                    Content-Transfer-Encoding: 8bit
                    X-Priority: 3 (Normal)
                    Importance: Normal
                    逗死了,你看看这个电影:D
                    

                    BTW, I'm new to LogicMail - which source is doing the transcoding (v 2.0)? I'd like to do some tests by myself.

                    • Message #166

                      I Changed TextPart.accept() to:

                              try {
                              	byte[] rawBytes = text.getBytes();
                              	this.text = new String(rawBytes, this.getCharset());
                              } catch (Exception e) {
                                  this.text = "Unsupported charset";
                              }
                              visitor.visitTextPart(this);
                      

                      and it can display (at least my) email content now.

                      I will test more to try out more encoding/MIME formats.

Subscriptions

Moderation