Get your own customer support community
 

Date.toLocaleString() returns broken Kanji when called in preview()

WinXP+SP3(Japanese), Firefox:(JP)3.5.2/.3, Ubiq:0.5.4

In Japanese environment, Date.toLocaleString() returns Kanji-mixed string.
But when it's called in command's preview() function, or called for object-property's initialization, it returns 'broken' (unreadable) Kanji-chars.
String.charCodeAt() seems that it generates Shift-JIS encoded Kanji-chars, not Unicode.
In contrast, it returns correct Kanji-mixed string when called in command's execute() function (and of course it's okay when running on browser, as normal web script).
I also tried to replace scripts/date.js with Datejs ja-JP version (packed in Datejs-all-Alpha1.zip), then restarted Firefox, but nothing changed.
I'm not sure whether this behavior can be reproduced in other user's environment. Is it Ubiquity's defect, or is my environment's problem ?

CmdUtils.CreateCommand({
names: ["test"],
str: (new Date()).toLocaleString(), //NG:Kanji broken
preview: function(pblock) {
displayMessage( (new Date()).toLocaleString() ); //NG:Kanji broken
},
execute: function() {
displayMessage( (new Date()).toLocaleString() ); //OK:correct Kanji
}
});
 
sad I’m frustrated
Inappropriate?
1 person has this problem

The company has acknowledged this problem.


User_default_medium