This example shows how your Java Application can write  ISO-Latin-1 encoded text to a file.  Please note the difference of this and the UTF-8 method. Both are identical, except for the FileOutputStreamWriter Object, which takes the charset  in it’s Constructor.

try {
    Writer out = new BufferedWriter(
        new OutputStreamWriter(new FileOutputStream("outfilename"), "8859_1"));
} catch (UnsupportedEncodingException e) {
} catch (IOException e) {


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.