I'm trying to write a string to a text file for import into a database. I can grab the output text from the output window and paste it into a new document that then imports correctly, but when I write the string directly to a new text file the carriage returns turn into little boxes (can't post an example because pasting them here turns them into carriage returns)
I'm sure I'm not getting something - tried both UTF8 and ISO char encodings. Latest attempt below:

try {
Writer out = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream("C:/spudtwo.txt"), "UTF8"));
} catch (UnsupportedEncodingException e) {
} catch (IOException e) {

Any help gratefully received.