Results 1 to 7 of 7

Thread: How to write a multibyte Hello World zimlet?

  1. #1
    frankman is offline Senior Member
    Join Date
    Apr 2008
    Posts
    69
    Rep Power
    7

    Question How to write a multibyte Hello World zimlet?

    I'm trying to make a "Hello World" zimlet like the one described in the wiki, but instead of just "Hello World" I want it to find "こんにちは" (Japanese for "Hello"). I'm having no luck and am looking for some ideas where I'm going wrong.

    I modified the wiki's example from this:
    Code:
     <zimlet name="com_zimbra_hello" version="1.0" description="Hello World">
         <contentObject>
             <matchOn>
                 <regex attrs="ig">Hello World</regex>
             </matchOn>
             <toolTip>Hello World Zimlet</toolTip>
         </contentObject>
     </zimlet>
    to this:
    Code:
    <zimlet name="com_zimbra_hello" version="1.0" description="こんにちは">
            <contentObject>
                    <matchOn>
                            <regex attrs="ig">こんにちは</regex>
                            <regex attrs="ig">\u3053\u3093\u306B\u3061\u306F</regex>
                            <regex attrs="ig">Hello World</regex>
                            <regex attrs="ig">=E3=81=93=E3=82=93=E3=81=AB=E3=81=A1=E3=81=AF</regex>
                            <regex attrs="ig">44GT44KT44Gr44Gh44Gv</regex>
                    </matchOn>
                    <toolTip>\u3053\u3093\u306B\u3061\u306F Hello World Zimlet</toolTip>
            </contentObject>
    </zimlet>
    The "Hello World" works finding the text and popping up the tool tip as expected.
    But for the "こんにちは" in an email, I get nothing.

    As you can see, I've used the literal string:
    Code:
    <regex attrs="ig">こんにちは</regex>
    I've used the Unicode codes:
    <regex attrs="ig">\u3053\u3093\u306B\u3061\u306F</regex>
    I've tried this search string:
    Code:
    <regex attrs="ig">=E3=81=93=E3=82=93=E3=81=AB=E3=81=A1=E3=81=AF</regex>
    Why? Because I've send myself an email with Japanese text wrapped in English (English+Japanese+English) in both the subject and body, so the encoding came out as "quoted-printable":
    Code:
    Subject: =?utf-8?Q?Hello_World_=E3=81=93=E3=82=93?=
     =?utf-8?Q?=E3=81=AB=E3=81=A1=E3=81=AF_Hello_World?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    X-Originating-IP: [192.168.0.2]
    X-Mailer: Zimbra 5.0.13_GA_2791.RHEL5 (ZimbraWebClient - FF3.0 (Mac)/5.0.13_GA_2791.RHEL5)
    
    Hello World =E3=81=93=E3=82=93=E3=81=AB=E3=81=A1=E3=81=AF Hello World

    Lastly, I tried this search string:
    Code:
    <regex attrs="ig">44GT44KT44Gr44Gh44Gv</regex>
    because, I sent myself an email with just Japanese text and it was automatically encoded as base64:
    Code:
    Subject: =?utf-8?B?44GT44KT44Gr44Gh44Gv?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: base64
    X-Originating-IP: [192.168.0.2]
    X-Mailer: Zimbra 5.0.13_GA_2791.RHEL5 (ZimbraWebClient - FF3.0 (Mac)/5.0.13_GA_2791.RHEL5)
    
    44GT44KT44Gr44Gh44Gv

    P.S. side note: The description (description="こんにちは">) has the literal UTF-8 string shows up fine in the admin UI.

    Does anyone know how to get the tooltip to popup on Unicode foreign language characters?

  2. #2
    jackangel is offline Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Rep Power
    5

    Default

    well, I can understand that the key word can be recognized by unicoding. but how about the tooltips content?
    Chinese or any other non-English character can not be shown in tooltips.

  3. #3
    cvidal is offline Project Contributor
    Join Date
    Dec 2005
    Posts
    146
    Rep Power
    9

    Default

    In French it is enough to add the encoding in the Zimlet tag as:

    Code:
    <zimlet name="com_zimbra_hello" version="1.0" description="Hello World" encoding="UTF-8">

  4. #4
    jackangel is offline Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Rep Power
    5

    Default

    Thanks very much. I tried but still not able to show Chinese character

    Today I tried again, but still not able to show French or Chinese!
    Even in UTF-8 or UTF-16.
    I have compiled and installed Zimbra6, Gun N Rose.
    What possibly is the cause?
    Last edited by jackangel; 04-07-2010 at 04:57 PM.

  5. #5
    raj's Avatar
    raj
    raj is offline Moderator
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    10

    Default

    download this zimlet and see how they supporting Chinese and other laguages

    Aruna Labs | GoAruna


    Raj
    i2k2 Networks
    Dedicated & Shared Zimbra Hosting Provider

  6. #6
    jackangel is offline Junior Member
    Join Date
    Mar 2010
    Posts
    5
    Rep Power
    5

    Default

    Hi, Raj
    which zimlet are you referring to?

  7. #7
    raj's Avatar
    raj
    raj is offline Moderator
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    10

    Default

    the link in my post..scroll to the very bottom..

    Raj
    i2k2 Networks
    Dedicated & Shared Zimbra Hosting Provider

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. [SOLVED] Error running mailboxd after script backup
    By ttortosa in forum Administrators
    Replies: 5
    Last Post: 10-22-2008, 01:33 AM
  3. Outlook 2007 Beta error
    By bersrker in forum Zimbra Connector for Outlook
    Replies: 13
    Last Post: 07-17-2008, 07:38 AM
  4. Replies: 13
    Last Post: 07-20-2007, 03:21 AM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •