This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: PayPal and umlauts, char encoding