#27703
Yutaka Emura
Keymaster

You can iterate through the characters of the string to get the name for each character. The attached script demonstrates how to iterate through characters in ascii strings and Unicode strings.

var string = 'ab';

// For ascii string
for (var i = 0; i < string.length; i++) {
	alert(editor.GetUnicodeName(string.charAt(i)));
}

// For unicode
var tmp = '';
for (var i = 0; i < string.length; i++) {
	tmp += string.charAt(i);
	if (!(0xd800 <= string.charCodeAt(i) && string.charCodeAt(i) <= 0xdbff)) {
		alert(editor.GetUnicodeName(tmp));
		tmp = '';
	}
}