i18n-related encoding fixes

Fixed double decodings and encodings. Added unicode-safety to _().