任何方式的正常字符串。ActionScript 3的转换为Latin-1的字符codeS中的ByteArray? [英] Any way to convert a regular string in ActionScript 3 to a ByteArray of Latin-1 Character Codes?
问题描述
我有没有问题的字符串转换为UTF-16连接codeD字符的字节数组,但应用程序,我要与通信(用Erlang编写的),只理解Latin-1编码。有没有办法从字符串中的ActionScript 3制作的ByteArray全Latin-1的字符codeS的?
I am having no problem converting a string to a byteArray of UTF-16 encoded characters, but the application I am trying to communicate with (written in Erlang) only understands Latin-1 encoding. Is there any way of producing a byteArray full of Latin-1 character codes from a string within Actionscript 3?
推荐答案
byteArray.writeMultiByte(字符串,ISO-8859-1);
byteArray.writeMultiByte(string, "iso-8859-1");
<一个href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/ByteArray.html#writeMultiByte">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/ByteArray.html#writeMultiByte()
这篇关于任何方式的正常字符串。ActionScript 3的转换为Latin-1的字符codeS中的ByteArray?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!