in reply to How to write true utf8 data to a file on native ebcdic system?
I'd try Encode::encode_utf8 and no encoding IO layer. Not sure if it works though.