wood burning stoves 2.0*
The moose likes Struts and the fly likes PayPal and umlauts, char encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "PayPal and umlauts, char encoding" Watch "PayPal and umlauts, char encoding" New topic
Author

PayPal and umlauts, char encoding

Paul Paulsen
Greenhorn

Joined: Jul 27, 2010
Posts: 7
Hi everybody,
we are using paypal to get payed by our customers.
now we have the problem when there are umlauts (äöü) in the address, the IPN* from paypal is not working, cause this special characters are not converted correctly.

I think the reason it is the charset encoding. the request from paypal is in 'windows-1252' (says the documentation) and tomcat/struts is reading everything as utf8?
When i enter "Sadfasdä" as street name. the request from pp is
'address_street=Sadfasd%E4'
but the getProperty("address_street") gives 'Sadfasd?' so i lost the character.

i tried to the setCharacterEncoding method on the request (both to utf8 and windows1252) > no change
i tried the CharacterEncodingFilter with both char sets. it gets called (i can see it in the stack trace), but when i set the encoding to Windows1252 and later check with getCharacterEncoding() on the request, it still says utf8) > no luck


how can i get this solved?


IPN*:
Instance Payment Notification, a system from payal where shortly after a customer made an transaction, the paypal server sends an http request with some post data(name, address, payment) to our server, so we get notified about this purchase.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PayPal and umlauts, char encoding