msootani / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

Illegal character #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I want to pass a emojicon to my webservice.
2. If I pass a plain text, no problem.

What is the expected output? What do you see instead?

03-05 12:17:27.725: W/System.err(17678): java.lang.IllegalArgumentException: 
Illegal character (d83d)
03-05 12:17:27.745: W/System.err(17678):     at 
org.kxml2.io.KXmlSerializer.reportInvalidCharacter(KXmlSerializer.java:144)
03-05 12:17:27.745: W/System.err(17678):     at 
org.kxml2.io.KXmlSerializer.writeEscaped(KXmlSerializer.java:130)
03-05 12:17:27.745: W/System.err(17678):     at 
org.kxml2.io.KXmlSerializer.text(KXmlSerializer.java:536)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.DM.writeInstance(DM.java:68)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializatio
nEnvelope.java:675)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(SoapSerializati
onEnvelope.java:668)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(SoapSerializa
tionEnvelope.java:613)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBodyWithAttributes
(SoapSerializationEnvelope.java:590)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializatio
nEnvelope.java:677)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeBody(SoapSerializationEn
velope.java:568)
03-05 12:17:27.745: W/System.err(17678):     at 
org.ksoap2.SoapEnvelope.write(SoapEnvelope.java:205)
03-05 12:17:27.755: W/System.err(17678):     at 
org.ksoap2.transport.Transport.createRequestData(Transport.java:134)
03-05 12:17:27.765: W/System.err(17678):     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:149)
03-05 12:17:27.775: W/System.err(17678):     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118)
03-05 12:17:27.795: E/SoapError(17678): Illegal character (d83d)

What version of the product are you using? On what operating system?
ksoap2-android-assembly-3.2.0-jar-with-dependencies.jar
Operating System: Android

Please provide any additional information below.

I try to save in my database with UTF-8 to view correctly with android and 
Iphone.

How to solve this?

Thanks for your help

Original issue reported on code.google.com by pcimag...@gmail.com on 5 Mar 2014 at 11:49

GoogleCodeExporter commented 9 years ago
I'm sorry to say but this is an android bug. View the issue and my comment 
here: https://code.google.com/p/android/issues/detail?id=64108

The android xml parser does not handle utf-16 code point surrogates correctly.

Original comment by islandma...@gmail.com on 5 Mar 2014 at 2:47

GoogleCodeExporter commented 9 years ago

Original comment by mosa...@gmail.com on 6 Mar 2014 at 9:33