[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

XML serialization problem with web service (Surrogate pair is invalid)

Jay

12/27/2002 11:34:00 AM

Hi,

I have developed a web service that takes three input arguments, all
strings.
The web service performs transliteration from one encoding to another.
The idea is that the arguments should all be 1-byte encoded characters.

The client application is one ASP.NET page.
The user can fill in Greek or Latin characters.
If the input is is Greek(the user must indicate this himself by selecting
the appropriate item in a list) I must first
convert the data from UTF-8 to ISO-8859-7.
Herefor I use an array that maps ASCII values.

A name containing 10 characters in UTF-8 was represented with 20 bytes.
After processing I get
a name that is still 10 characters but is now represented with 10 bytes.

Example:
Greek name : ????????????
UTF-8 : 3 160 3 145 3 160 3 145 3 147 3 149 3 169 3 161 3 147 3
145 3 154 3 151
ISO-8859-7: 208 193 208 193 195 197 217 209 195 193 202 199

These bytes are then converted into a string.

During the serialization process I sometimes get this error message:
"Surrogate pair is invalid".
Some names do not cause any problem at all while others make the app crash.

I have no idea why this is happening because or how I can fix this.
Any help is appreciated.
Thanks.

J