|
-
For unicode char, the result of escape seems different in Flash 5 and Flash MX.
For the same unicode char:
The result of Flash 5 is %xx%xx
The result of Flash MX is %xx%xx%xx
This difference also appears in unescape function.
Is'nt there an international standard for this algorithm ? Why is the result 3 byte format ? And I ever heard about something like %xxxx thing for escaping unicode ?
One guy post that something weird about escape function in Win98 se. Mine is win98. However, if I conform the escape format accoding to Flash version number, it works correctly. Of-course, if I mess it with version number, the result wont be correct.
-
I know now. If some one like me do not have good knowledge about uni-code, it would be a dizaster when shift from flash 5 to MX.
MX does not only "support" UNICODE, all the code manipulation is according to UNICODE encoding now. This shift might not cause trouble for English user. But definitely puzzles users that make Flash movie with Foreign characters when loadVariables.
For Chinese char "WELL", in Flash 5, the charCodeAt return A4AB and you can use "\uA4AB" to represent that char and the escape result is "%A4%AB";
Now in Flash MX, the unicode: the charCodeAt for the same char "WELL" return 4E95; You can use "\u4E95" to represent that char, and the escape result is "%E4%BA%95"; It conforms to the encoding that UTF described.
I have seen several post about trouble caused by this. Especially for those using Foreign characters. If we use Flash MX to edit our Flash 5 fla, the variable file that is used in loadVariables must renew by the unicode-escape function supplied by Flash MX. Also, if we use charCodeAt , it is different now.
-
Hi,
Thanks for a quick answer. I´m a bit confused, but as I understand your writing, I have to renew my external .txt file with the unicode-escape function supplied by Flash MX, but how do I do that?
Hope you can help me out!
Thanks,
Thomas
-
str1="&+=%@";
str2=escape(str1);
trace(str2);
//%26%2B%3D%25%40
For string that contains only ordinary English, the result is the same for Flash 5 and Flahs MX;
-
Hmm
Hmmm, I don´t understand your example. How would you write "størst" in unicoding in order to get Flash MX to show it?
thanks,
Thomas
Originally posted by ericlin
str1="&+=%@";
str2=escape(str1);
trace(str2);
//%26%2B%3D%25%40
For string that contains only ordinary English, the result is the same for Flash 5 and Flahs MX;
-
Re: Hmm
I dont know how to enter specific character directly into the Flash MX text box. I think some 2000 system might support this unicode input method.
I just make textbox1.text+="\u00E5"; with the font set to Arial, then the special Å comes out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|