Message 1 of 2
Wrong encoding from parameters
Not applicable
02-11-2019
11:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
if document Author or whatever global parameter contains unicode chars "ěščřžýáíé...." function
getGlobalParameter("inventor:Author") returns mismatch string:
CPS encoding is set to setCodePage("utf-8");
Author: ěščřžýáíé
writeln(getGlobalParameter("inventor:Author"));
returns in HSM Edit "=> ۛá¡ÃÂٙþ¾ý½á¡ÃÂé©."
if opened in utf-8 editor, because HSM Edit doesn't show UTF-8 chars (in 2019?)
returns "Ûá¡ÍÙþ¾ý½á¡íé©"
text = getGlobalParameter("inventor:Author");
for (var i = 0; i < text.length; ++i) writeln(text.charCodeAt(i));
returns "219, 155, 225, 161, 205, 141, 217, 153, 254, 190, 253, 189, 225, 161, 237, 173, 233, 169"
Is it bug or i missed something ?