 
         protected function saveAsUtf16(str:String):ByteArray {
             var bytes:ByteArray = new ByteArray();
+            bytes.writeByte(0xFF);
+            bytes.writeByte(0xFE);
             for (var i:int = 0; i < str.length; i++) {
                 var code:int = str.charCodeAt(i);
                 if (code < 0XFF) {


        protected function saveAsUtf8(str:String):ByteArray {
            var bytes:ByteArray = new ByteArray();
            bytes.writeUTFBytes(str);

            return bytes;

            charset = newCharset;
        }

        public function setStrData(newData:String):void {
            data = newData;
        }
    }
