in reply to How to write true utf8 data to a file on native ebcdic system?

Try :encoding(UTF-8) instead of :utf8.