I have the following piece of code:
def f = new File("test.txt")
f.write("test", "UTF-8")
When opening the file in Notepad++ (or any other editor) it is still in ISO-8859-1 instead of UTF-8. Opening the file in a hex editor it does not contain the "magic bytes" 0xEFBBBF
.
Regards,
Robert