Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert encoding in flash actionscript 3

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.

like image 496
Hik Avatar asked Jul 12 '26 13:07

Hik


1 Answers

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

var bytes:ByteArray = new ByteArray();
bytes.writeMultiByte("Δ", "iso-8859-7");  // Capital delta
assertEquals(0xc4, bytes[0]);
like image 55
bill d Avatar answered Jul 14 '26 11:07

bill d



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!