@Caleb - about keeping the Unicode characters, it's been awhile so I don't remember exactly what I did, but you have the option to write various text standard-compliant files, like utf-8 for example. I took a look at using Python's codecs too I think. Anyway, you can choose to keep the 'non-compliant' characters and write a unicode type text file - but then you may have problems in an app that adheres to the ANSI standard (which defeats the purpose of producing the file in the 1st place if you needed it as sort of an 'interoperable' solution).
At the very least, it was more useful not to crash the tool upon the mere encounter with non-ANSI characters, lol! If I remember correctly, part of the exercise was trying to find out why some of the other tools were crashing too -- they were all choking on an apostrophe Unicode character, interesting but annoying.
I'll try to dig up and post what I put together that served the purpose at the time.