I want to save a file in utf-8 encoding format (NOT utf-8 without BOM). There is no explicit information on Adobe Charset support page
(http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/charset-codes.html)
I want to save the file in utf-8 format with csv extension. I have tried the following but i am getting what i want:
byte.writeMultiBytes(fileContent,"utf-8");
I have also tried,
unicode-1-1-utf-8, unicode-2-0-utf-8, x-unicode-2-0-utf-8.
I have also tried with other methods as well but still not getting the required encoding format:
writeUTF(var:String) writeByte(var:String)
Here's what I have right now,
var fileReference:FileReference = new FileReference();
var bytes:ByteArray = new ByteArray();
// SAVING file in utf-8 encoding format.
bytes.writeUTFBytes(this.fileContents);
fileReference.save(bytes, "PluginLog.csv");
closePopup(null);