Reputation: 33
Is there any function like php's mb_convert_encoding
which can convert an encoding to another?
I want to convert the utf-8 text, passed in a input field inside the flash, to iso-8859-7 encoding.
Upvotes: 3
Views: 3062
Reputation: 618
Yup, try flash.utils.ByteArray::writeMultiByte()
:
var bytes:ByteArray = new ByteArray();
bytes.writeMultiByte("Δ", "iso-8859-7"); // Capital delta
assertEquals(0xc4, bytes[0]);
Upvotes: 3