views:

1032

answers:

1

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.

+2  A: 

Yup, try flash.utils.ByteArray::writeMultiByte():

var bytes:ByteArray = new ByteArray();
bytes.writeMultiByte("Δ", "iso-8859-7");  // Capital delta
assertEquals(0xc4, bytes[0]);
bill d