• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Browser cant display Central European Characters UTF-8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Browser cant display Central European Characters UTF-8


  • Subject: Re: Browser cant display Central European Characters UTF-8
  • From: David Avendasora <email@hidden>
  • Date: Wed, 17 Jun 2009 08:38:19 -0400

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!

Dave


On Jun 17, 2009, at 7:25 AM, Gustavo Adolfo Pizano wrote:

Hello.

I have some components and they have some UTF-8 characters, I set up my workspace to UTF-8 also the text file encoding of the project as UTF-8, when I edit the html I can place the words and I can see those characters, but when I run the application safari just shows an ? on those characters..

what should I do to avoid this behavior ?

Gustavo

Forgot to mention that in the html file in the <met> tag I have .... content = "text/html; charset=utf-8"/ >


_______________________________________________ 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



_______________________________________________ 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
  • Follow-Ups:
    • Re: Browser cant display Central European Characters UTF-8
      • From: Guido Neitzer <email@hidden>
References: 
 >Browser cant display Central European Characters UTF-8 (From: Gustavo Adolfo Pizano <email@hidden>)

  • Prev by Date: Re: Ant install wo app with debug
  • Next by Date: Re: Escaping in strings according to WOML
  • Previous by thread: Browser cant display Central European Characters UTF-8
  • Next by thread: Re: Browser cant display Central European Characters UTF-8
  • Index(es):
    • Date
    • Thread