Fixed issue with 4-byte characters not being written properly