0 Replies Latest reply on Jul 6, 2010 1:27 PM by JPollock8

    Saving english to a text file results in Chinese

    JPollock8

      So I have a program that queries my database and manipulates the data and saves it all to a string.

       

      This works and I have tested the functionality by making it show up on screen (as an Alert and into a text box) before it finally saves the data to my desktop as a text document.

       

      But when I open up the text document to verify the saved data matches what showed up with my Alert or in the text box, I only get Chinese looking characters.

       

      This is the function I am using to save the text to my hdd:

       

      private function saveFile(contents:String):void
      {
           fr = new FileReference();
           fr.addEventListener(Event.COMPLETE, fileSave);
           fr.addEventListener(Event.CANCEL,fileCancel);
           fr.addEventListener(IOErrorEvent.IO_ERROR, fileSaveError);
           fr.save(contents, "ExampleText.txt");
      }

       

      Any help would be appreciated