Mike Walker
Mike Walker

Reputation: 3176

Swift use unicode character in localization.strings

I am trying to put a unicode character inside my localization.strings file. When I manually set a label's text to "\u{F071}", the character appears properly. When I have that character as part of a string within the localization file, then the unicode character does not appear like I want it. Is there some encoding setting that I might be missing? Or should we not have unicode characters within the localization file?

Upvotes: 13

Views: 4106

Answers (1)

Bill Chan
Bill Chan

Reputation: 3473

You have to follow localization.strings's unicode format, e.g.:

"your-key" = "\UF071";

Upvotes: 17

Related Questions