some text encoding fixes