fix text encoding