Fix crash for locale without explicit encoding (Gentoo bug #527240)
Save one round of encoding/decoding back and forth