WOResourceManager and localization issue
WOResourceManager and localization issue
- Subject: WOResourceManager and localization issue
- From: Miguel Arroz <email@hidden>
- Date: Thu, 8 Dec 2005 19:15:26 +0000
Hi!
I'm reading a string from a .strings file that contains
accentuated characters. The code is the following:
public static String portugueseLanguageName() {
return Application.application().resourceManager
().stringForKey(Session.PORTUGUESE_LANGUAGE_KEY,
Application.RESOURCES_DEFAULT_TABLE_NAME,
"PT",
null,
new NSArray(new Object[] {"Portuguese"}));
}
The file is in XML format and was created with Property List
Editor. Any attempt to create the file using a normal text editor
results in parsing error at the first character. Even opening and
saving the file without modifications in TextWrangler originates an
error (anyone knows why?).
Well, but my problem is far more serious. I'm using that string to
fill one of the items of a pop up menu on a page. I have followed all
the UTF-8 related precautions, overloadings, etc, explained on
Chuck's book. Still, instead of Português, I get some strange
characters (like russian or greek) instead of the accentuated ê.
I try to write some accentuated text on a component, and save it
has UTF-8. WebObjects builder 5.3.1 appears to always save those
characters using escape characters, like é instead of é.
Nevertheless, I edited the .woo file to set the right encoding, and
editied the .html file in TextWrangler, restoring the real
accentuated characters. It works! That appear on the browser as they
should. The only problem is the pop-up menu made with strings that
come from a .strings file, so my guess is that the problem is related
to the file reading/decoding.
I find this strange, as the .strings method is mentioned on
chuck's book, so I guess it should work... what the heck is going on
here?
Yours
Miguel Arroz
"The world lies in the hands of evil
And we pray it would last" -- Apocalyptica, Life Burns!
Miguel Arroz
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden