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 06-14-2006, 06:42 PM
Intermediate Member
 
Posts: 17
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
Reply With Quote
  #2 (permalink)  
Old 06-16-2006, 10:20 PM
Zimbra Employee
 
Posts: 4,792
Default

Which Zimlet? Or are you trying to write your own?
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 06-18-2006, 07:00 PM
Intermediate Member
 
Posts: 17
Default

I'm trying to write by myself.
Reply With Quote
  #4 (permalink)  
Old 06-19-2006, 04:41 PM
Zimbra Employee
 
Posts: 4,792
Default

What error are you getting? Can you post the code that has the error?
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #5 (permalink)  
Old 06-19-2006, 06:39 PM
Intermediate Member
 
Posts: 17
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
File Type: jpg broken_character.JPG (46.4 KB, 179 views)
Reply With Quote
  #6 (permalink)  
Old 06-20-2006, 08:20 AM
Zimbra Employee
 
Posts: 4,792
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.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #7 (permalink)  
Old 06-21-2006, 08:44 AM
Intermediate Member
 
Posts: 17
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
Reply With Quote
  #8 (permalink)  
Old 06-21-2006, 11:13 AM
Zimbra Employee
 
Posts: 4,792
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.
__________________
Bugzilla - Wiki - Downloads - Offline Client
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.