my dog learned polymorphism
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

PayPal and umlauts, char encoding

Paul Paulsen

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
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?

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.
I agree. Here's the link:
subject: PayPal and umlauts, char encoding
It's not a secret anymore!