Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-2009, 08:36 AM
Senior Member
 
Posts: 69
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:
Quote:
<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?
Reply With Quote
  #2 (permalink)  
Old 04-01-2010, 03:35 AM
Junior Member
 
Posts: 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.
Reply With Quote
  #3 (permalink)  
Old 04-06-2010, 01:50 AM
Project Contributor
 
Posts: 136
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">
Reply With Quote
  #4 (permalink)  
Old 04-06-2010, 07:01 AM
Junior Member
 
Posts: 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 05:57 PM..
Reply With Quote
  #5 (permalink)  
Old 04-06-2010, 10:11 AM
raj raj is offline
Moderator
 
Posts: 759
Default

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

Aruna Labs | GoAruna


Raj
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
  #6 (permalink)  
Old 04-07-2010, 05:58 PM
Junior Member
 
Posts: 5
Default

Hi, Raj
which zimlet are you referring to?
Reply With Quote
  #7 (permalink)  
Old 04-07-2010, 09:00 PM
raj raj is offline
Moderator
 
Posts: 759
Default

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

Raj
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.