title: How to convert an UTF String to ANSI and Create an ANSI text file in ExternalSD with JAVA-ANDROID
body: <p>I wrote a android app in java to get user answers and save them in a file.
  The problem is that this file is saved in utf-8.
  The end user will open these files in the IBM SPSS, an application for windows that can read files only in ANSI (windows-1252).</p>
  <p><strong>How do I create files in ANSI code to save in a SD card from java-android app?</strong></p>
  <p>I think I know that to convert Strings to ANSI I should use:</p>
  <pre><code>String unicode = new String(asciiBytes, &quot;windows-1252&quot;);
  </code></pre>
  <p><strong>Is that correct?</strong></p>
  <p>My code to save the file is this:</p>
  <pre><code>File interviewFile = new File(placeOfSDD, fileName);
  FileWriter writer = new FileWriter(interviewFile, true);
  writer.append(textBody);
  writer.flush();
  writer.close();
  </code></pre>
  <p>&quot;textBody&quot; is the String to convert to ANSI, and the &quot;interviewFile&quot; is the file to be saved as ANSI too.</p>
  <p>Thanks for the help!!</p>