I can use multibyte character(Kanji) in Zimbra
but I cannot use in zimlet.
How can I use multibyte character in zimlet?
Thanks&Regards
How can I use multibyte character in zimlet?
-
- Ambassador
- Posts: 4558
- Joined: Fri Sep 12, 2014 9:52 pm
How can I use multibyte character in zimlet?
Which Zimlet? Or are you trying to write your own?
How can I use multibyte character in zimlet?
I'm trying to write by myself.
-
- Ambassador
- Posts: 4558
- Joined: Fri Sep 12, 2014 9:52 pm
How can I use multibyte character in zimlet?
What error are you getting? Can you post the code that has the error?
How can I use multibyte character in zimlet?
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');
}
broken_character.JPG
/// 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');
}
broken_character.JPG
-
- Ambassador
- Posts: 4558
- Joined: Fri Sep 12, 2014 9:52 pm
How can I use multibyte character in zimlet?
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.
How can I use multibyte character in zimlet?
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
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
-
- Ambassador
- Posts: 4558
- Joined: Fri Sep 12, 2014 9:52 pm
How can I use multibyte character in zimlet?
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.