Re: Browser cant display Central European Characters UTF-8
Re: Browser cant display Central European Characters UTF-8
- Subject: Re: Browser cant display Central European Characters UTF-8
- From: Gustavo Adolfo Pizano <email@hidden>
- Date: Wed, 17 Jun 2009 19:55:25 +0200
Guido.
Im using 5.4.3
I did the
ERXMessageEncoding.setDefaultEncodingForAllLanguages("UTF-8"); at the
Application consturctor and so far it works.. but if there is a
"better" way to do it, Im all ears.
G
On Jun 17, 2009, at 5:03 PM, Guido Neitzer wrote:
On 17. Jun. 2009, at 05:38 , David Avendasora wrote:
Hey Gustavo,
I was having the same problem (only getting ™ to display correctly
instead of diamond-?). I added the following methods to my
Application.java class and everything works now. I don't know if
this is the "best" way to resolve it or not though.
@Override
public void appendToResponse(WOResponse response,
WOContext context) {
super.appendToResponse(response,
context);
if
(_NSUtilities
.UTF8StringEncoding.equals(response.contentEncoding())) {
response.setHeader("text/html; charset=UTF-8; encoding=UTF-8",
"content-type");
}
}
@Override
public WOResponse dispatchRequest(WORequest request) {
request.setContentEncoding(_NSUtilities.UTF8StringEncoding);
return super.dispatchRequest(request);
}
I hope this helps!
This shouldn't be necessary anymore with WO 5.4. So Gustavo, what WO
version are you running?
Guido
_______________________________________________
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