Re: Browser cant display Central European Characters UTF-8

2009-06-17 Thread David Avendasora

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Browser cant display Central European Characters UTF-8

2009-06-17 Thread Guido Neitzer

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Browser cant display Central European Characters UTF-8

2009-06-17 Thread Gustavo Adolfo Pizano

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Browser cant display Central European Characters UTF-8

2009-06-17 Thread Guido Neitzer

On 17. Jun. 2009, at 10:55 , Gustavo Adolfo Pizano wrote:

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.


## This is the one-stop-shop for setting the default encoding  
everywhere.

## When in doubt, set this one.
er.extensions.ERXApplication.DefaultEncoding=UTF-8

Guido
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Browser cant display Central European Characters UTF-8

2009-06-17 Thread Gustavo Adolfo Pizano

aha.. ok thanks

I will try it 2morrrow at the office

G

On Jun 17, 2009, at 8:40 PM, Guido Neitzer wrote:


On 17. Jun. 2009, at 10:55 , Gustavo Adolfo Pizano wrote:

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.


## This is the one-stop-shop for setting the default encoding  
everywhere.

## When in doubt, set this one.
er.extensions.ERXApplication.DefaultEncoding=UTF-8

Guido


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com