views:

85

answers:

2

Hi,

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:";
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.

I use NSLocalizedString this way:

self.saveSettingsLabel.text = NSLocalizedString(@"login.saveSettings", @"Save Settings:");

What am I doing wrong?

Thanks for any help! Mihai

A: 

I ended up finding a small Java program that replaces any Unicode sequence with the actual character: http://stackoverflow.com/questions/1493576/conversion-from-javascript-escaped-unicode-to-java-unicode

Mihai Fonoage
+1  A: 

The correct variant is \U00F3 with 1 backslash and a capital U.

KennyTM
Absolutely right. From all combinations I tried, I missed the right one. Thank you!
Mihai Fonoage