Support non-utf8 encodings through text-locale-encoding