var test_length:Int = "你好".length;
Log.trace("length:"+test_length);
when run in flash ,output:
Main.hx:80: length:2
when run in android ,output:
I/trace ( 9334): Main.hx:80: length:6
the cmd is:
openfl test android -x -v -debug -Dnext
Why?
i know Utf8.length(“你好”) is 2,but i don’t want to modify too much code.
the textfield in android has something wrong,when input Chinese word. I think the reson is : the result of string’s api is diffrence between flash and cpp target.
who can help me? thank very much.