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.


    • 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:

        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:

            (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




                ½² ʦ£ºº«Ð¥


                correct content:

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

                • Message #138


                  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.


                  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: <>
                  From: Derek Konigsberg <>
                  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;
                  Content-Transfer-Encoding: base64
                  Content-Disposition: inline
                  Message-Id: <>
                  • 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: <>
                    Received: from localhost (localhost [])
                    by w1 (Postfix) with ESMTP id F0092AF5499
                    for <>; Mon, 13 Oct 2008 23:05:33 +0800 (CST)
                    X-Virus-Scanned: amavisd-new at
                    Received: from w1 ([])
                    by localhost ( []) (amavisd-new, port 10024)
                    with LMTP id IzGV9YAeugrx for <>;
                    Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Received: from (localhost [])
                    by w1 (Postfix) with ESMTP id C96DCAF5491
                    for <>; Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Received: from
                    (SquirrelMail authenticated user pal)
                    by with HTTP;
                    Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Message-ID: <>
                    Date: Mon, 13 Oct 2008 23:05:27 +0800 (CST)
                    Subject: =?gb2312?Q?=CB=AE=BE=A7=F7=BC=F7=C3?=
                    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

                    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";

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

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