To have to words that cannot be separated by line breaks, I want to exchange a whitespace with \u{a0}
(see this answer).
My problem is, that Unicode characters do not seem to work with NSLocalizedString
.
This is what I tried:
"myKey" = "ababa\u{a0}ababa"; // results in "ababau{a0}ababa"
"myKey" = "ababa\u00a0ababa"; // results in "ababau00a0ababa"
"myKey" = "ababa\\u{a0}ababa";// results in "ababa\\u{a0}ababa"
I use NSLocalizedString("myKey", tableName: "myTable", comment: String)
to load the string (I load it from a version specific LocalizedString)