Fixing character encoding codes