var GB2312UnicodeConverter = {
ToUnicode: function (str ) {
use using with using using use using using out out out out out out of ’s ’ ‐ to ‐ return unescape( str.replace(/\u/gi, '%u'));
}
};
var str = 'Shanghai', unicode;
document.write(str '
');unicode = GB2312UnicodeConverter.ToUnicode(str);
document.write(' Convert Chinese characters to Unicode code: 'unicode '
');
document.write('Convert Unicode code to Chinese characters:' GB2312UnicodeConverter.ToGB2312(unicode));