问题描述
我正在将应用程序本地化为西班牙语,并且使用Unicode将字符编码为该语言的Localizable.strings文件。例如,我有条目:
I'm localizing an app to spanish, and characters are encoded in the Localizable.strings file for that language using Unicode. For example, I have the entry:
"login.saveSettings"="Guardar configuraci\\u00F3n:";
显示在UILabel中的那个(Guardar configuraci \\\\ 00003:),而不是Guardarconfiguración:。我尝试了不同的变体,例如\ u00F3或\\U00F3,但没有任何成功。
which is displayed in a UILabel exactly like that ("Guardar configuraci\\u00F3n:"), instead of "Guardar configuración:". I tried different variations, such as "\u00F3", or "\\U00F3", but without any success.
我以这种方式使用NSLocalizedString:
I use NSLocalizedString this way:
self.saveSettingsLabel.text = NSLocalizedString(@"login.saveSettings", @"Save Settings:");
我做错了什么?
感谢您的帮助!
Mihai
Thanks for any help!Mihai
推荐答案
正确的变体是 \ U00F3
1反斜杠和大写U.
The correct variant is \U00F3
with 1 backslash and a capital U.
这篇关于显示时未转换Unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!