Two Laptop Bag*
The moose likes Web Services and the fly likes soap and utf-8 encoding issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "soap and utf-8 encoding issue" Watch "soap and utf-8 encoding issue" New topic
Author

soap and utf-8 encoding issue

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
hi all,

i am using a webservices to send out email and I am having a problem with displaying proper swedish and german letters.

after researching i know that i have problem with encoding.

therefore i changed the following segment of code from "ISO-8859-1" to "utf-8".






after changing the above i am getting the following error. The online solution haven't been specific. can someone advise me what should i do ?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
How have you ascertained that the text being handled is, in fact, encoded in UTF-8? It sounds as if it may not be.


Ping & DNS - my free Android networking tools app
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thanks for your reply.

may i know how can i check?

i wanna display swedish character and also german character.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
Well, how is the client sending data to that web service? Have you inspected the XML in transit? It'll show you which encoding is used during transport.
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thanks for your reply.

i checked all the xml files and they are labeled <?xml version="1.0" encoding="utf-8"?>.

however, when i check the format of it using notepad++, it appears to be encode in ANSI. how can i change it to utf-8?
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
i am the code below to send my soap file. when i change my charset below to UTF-8, an error occur. how can i send soap with utf-8 encoding?




the error code is below:


thank you!
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Recently we had a short discussion about the subject - Enoding issue of response from a web service for non english characters.

Regards,
Dan

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thank you very much. i will try it tomorrow when i get back to thte office.

/bryan
 
wood burning stoves
 
subject: soap and utf-8 encoding issue
 
Similar Threads
Error in PrivateKey Encryption in Applet
How to resolve "MalformedByteSequenceException: Invalid"
SAXException: Invalid byte 2 of 2-byte UTF-8 sequence
Help me in getting the value of a cell after editing in Jtable
Problem to help