Results 1 to 8 of 8

Thread: How can I use multibyte character in zimlet?

  1. #1
    Kenji is offline Intermediate Member
    Join Date
    Jun 2006
    Posts
    17
    Rep Power
    8

    Default How can I use multibyte character in zimlet?

    I can use multibyte character(Kanji) in Zimbra
    but I cannot use in zimlet.

    How can I use multibyte character in zimlet?

    Thanks&Regards

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    Which Zimlet? Or are you trying to write your own?
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Kenji is offline Intermediate Member
    Join Date
    Jun 2006
    Posts
    17
    Rep Power
    8

    Default

    I'm trying to write by myself.

  4. #4
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    What error are you getting? Can you post the code that has the error?
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  5. #5
    Kenji is offline Intermediate Member
    Join Date
    Jun 2006
    Posts
    17
    Rep Power
    8

    Default

    This is my source based on com_zimbra_sforce.

    /// Called by the Zimbra framework when the SForce panel item was clicked
    Com_Zimbra_Osc.prototype.singleClicked = function() {
    alert('singleClicked start');

    //I want to display "display japanese:テスト"
    alert('display japanese:テスト');

    if(!this.sessionID) {
    alert('login');
    this.login();
    }
    else {
    alert('get Meeting');
    this.get_meeting();
    }

    alert('singleClicked end');
    }
    Attached Images Attached Images

  6. #6
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    Ahh ok you need to use the Unicode representation and not the literal strings. There's no Zimbra specific code there, by just calling alert() on some text is native JavaScript. You need to use the same encoded characters just like you put in the properties files for localization.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  7. #7
    Kenji is offline Intermediate Member
    Join Date
    Jun 2006
    Posts
    17
    Rep Power
    8

    Default

    I see.

    I want to encode string to Unicode without using native2ascii.

    I prepared two files.
    They are being encoded to Unicode(UTF-8,UTF-16)

    If string is encoded to UTF-8, then broken string is displayed.
    But if string is encoded to UTF-16, then normal string is displayed.

    I want to convert UTF-8 to UTF-16 in zimlet module.
    Do you know such a function?

    I'm sorry by my poor English.

    Thanks&Regards

  8. #8
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    I don't know of any UTF-16 converters in JavaScript. It might be better to do that in a JSP or on the server side.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

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. Replies: 5
    Last Post: 01-11-2008, 05:34 AM
  3. Replies: 13
    Last Post: 07-20-2007, 03:21 AM
  4. Domain Admin Error: Permission Denied
    By shanson in forum Administrators
    Replies: 3
    Last Post: 05-29-2007, 05:48 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
  •