String.fromCharCode(0) problem - actionscript 2
I am trying to convert a bytearray
into a string
. The problem is whenever I try to append a NULL
character using String.fromCharCode(0)
it cuts off the e开发者_如何学Cnd of the string and than I cant run it throw base64
. I tried using String.fromCharCode(32) (space)
instead but no luck.
Any ideas of how to resolve it?
Thanks!
You don't need to convert your data to a string, you can use directly Base64Encoder::encodeBytes
to encode your ByteArray.
精彩评论