Re: Problem with page encoding
Re: Problem with page encoding
- Subject: Re: Problem with page encoding
- From: Dev WO <email@hidden>
- Date: Fri, 17 Feb 2006 09:42:23 +0100
On Feb 16, 2006, at 6:58 PM, Peteris Krisjanis wrote:
Thanks for clues to these pages. I did as it was asked, and
WOMessage.setDefaultEncoding("UTF8") worked for some part - now
all text written in WOComponent as in HTML works correctly.
However, now I have problems with text in unicode from java class
file
I've never done that. I have always had keys in my file and looked
up the message in a .strings file. Easy to localize and easier to
make changes to deployed apps.
I fully agree with Chuck. You'd better use a .string file and use
WOResourceManager to access the data.
Your .string file must be in UTF-16 to work properly.
The issue your having is that UTF-8 isn't correctly detected and so
get some garbaged text.
If you really need to use the text directly in the Java file you need
to set the encoding of this file to Western (Mac OS Roman) and choose
"Convert" in the confirmation panel.
(which is saved in utf-8, of course), as they shows up as uncoded
Unicode, as is utf-8 page has been shown in some non-unicode
encoding. As I want to add error messages from class file trough
actions, they show up wrong. However, rest of page (HTML part)
shows up correctly, as intended, in utf-8.
I have tried different solutions from your suggested page, but so
far no luck on this part.
Any other suggestions?
I have heard of / seen some problems when the characters in a file
don't clearly indicate that it is UTF8. The solution that I have
seen is to make it UTF-16 which does not have any problems with
ambiguous encodings.
Don't use UTF-16 for the .java files, your project won't compile (I
don't know why, but it won't).
Only for the .string file your accessing using WOResourceManager.
Xavier
Chuck Hill wrote:
Go over to http://www.wodev.com and search for UTF8. That should
get you somewhere.
Chuck
On Feb 15, 2006, at 9:06 PM, Peteris Krisjanis wrote:
Hi!
I have rather strange problem - my WO app when launched doesn't
show UTF-8 characters normally, except for those textual data
who have been taken from database (Postgresql, UTF-8). HTML is
itself utf-8 (At least it is how WOBuilder claims), class file
too. But when launched in page instead of correct symbols I get
question marks.
How do deal with this rather annoying problem? Is this problem
on server side? I need solution for this ASAP, so, any clues
would be very welcome,
Peter.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--Coming in 2006 - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems. http://www.global-village.net/products/
practical_webobjects
--
Coming in 2006 - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/
practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anazys.com
This email sent to email@hidden
_______________________________________________
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