Hello everyone,
i have trouble writing an ANSI file from groovy,
i get a file that is recognized by notepad++ as "Windows-1252" but the special characters don't display properly.

import java.io.FileWriter
import java.io.BufferedWriter
import java.io.InputStream
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
String fullPath = "/tmp/jamesTempFiles/ansi.txt"
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fullPath), "Cp1252"))
//doesn't work either when i use the following line instead
//BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fullPath), "windows-1252"))
String input = "testäüöß"
writer.write(input)
//doesn't work either when i use the following line instead
//writer.write(new String(input.getBytes(Charset.forName("utf-8"))))
writer.close()
Any Ideas?
Thanks in Advance
Jens