Is it possible to convert a string containing “high” unicode chars to an array consisting of dec values derived from utf-32 (“real”) codes?
问题 Please, look at this script operating on a (theoretically possible) string: <!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <script src="jquery.js"></script> <script> $(function () { $("#click").click(function () { var txt = $('#high-unicode').text(); var codes = ''; for (var i = 0; i < txt.length; i++) { if (i > 0) codes += ','; codes += txt.charCodeAt(i); } alert(codes); }); }); </script> </head> <body> <span id="click">click</span><br /> <span id="high-unicode">𝑥<!--