473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

UTF-8 deserialiation problem

I have made a web service operation that just return the input string that
is sent as a parameter. If the characters in the string is, for example the
Norwegian letters "æøå", the returned string is not deserialised to the same
string as sent in. I have checked that in the returned soap message, the
letter are binary the same.

I have caught the serialized soap message and it looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://localhost:8080/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws"
xmlns:types="http://localhost:8080/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:return_string>
<EDMsessionId xsi:type="xsd:string">OK</EDMsessionId>
<IN_STRING xsi:type="xsd:string">æøå</IN_STRING>
</tns:return_string>
</soap:Body>
</soap:Envelope>
The returned soap message is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://localhost/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns2="http://epmtech.jotne.com/GURUMOD/gurumod_WS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:return_stringResponse>
<Response xsi:type="xsd:string">æøå</Response>
</ns1:return_stringResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sep 29 '08 #1
2 1574


"Olav L" <Olav L@discussions.microsoft.comwrote in message
news:44**********************************@microsof t.com...
I have made a web service operation that just return the input string
that
is sent as a parameter. If the characters in the string is, for example
the
Norwegian letters "æøå", the returned string is not deserialised to the
same
string as sent in. I have checked that in the returned soap message, the
letter are binary the same.

I have caught the serialized soap message and it looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://localhost:8080/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws"
xmlns:types="http://localhost:8080/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:return_string>
<EDMsessionId xsi:type="xsd:string">OK</EDMsessionId>
<IN_STRING xsi:type="xsd:string">æøå</IN_STRING>
</tns:return_string>
</soap:Body>
</soap:Envelope>
The returned soap message is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://localhost/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns2="http://epmtech.jotne.com/GURUMOD/gurumod_WS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:return_stringResponse>
<Response xsi:type="xsd:string">æøå</Response>
</ns1:return_stringResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The request and response look the same to me. How did you determine that
they are different?
--
John Saunders | MVP - Connected System Developer

Sep 29 '08 #2


"John Saunders" wrote:
>

"Olav L" <Olav L@discussions.microsoft.comwrote in message
news:44**********************************@microsof t.com...
I have made a web service operation that just return the input string
that
is sent as a parameter. If the characters in the string is, for example
the
Norwegian letters "æøå", the returned string is not deserialised to the
same
string as sent in. I have checked that in the returned soap message, the
letter are binary the same.

I have caught the serialized soap message and it looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://localhost:8080/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws"
xmlns:types="http://localhost:8080/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:return_string>
<EDMsessionId xsi:type="xsd:string">OK</EDMsessionId>
<IN_STRING xsi:type="xsd:string">æøå</IN_STRING>
</tns:return_string>
</soap:Body>
</soap:Envelope>
The returned soap message is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://localhost/EDMWS/earlybinding/DataRepository/gurumod/QEX/gurumod_ws"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns2="http://epmtech.jotne.com/GURUMOD/gurumod_WS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:return_stringResponse>
<Response xsi:type="xsd:string">æøå</Response>
</ns1:return_stringResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The request and response look the same to me. How did you determine that
they are different?
--
John Saunders | MVP - Connected System Developer

In the Visual Studio, the debugger shows "??????" as the response value.
Sep 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: lawrence | last post by:
Someone on www.php.net suggested using a seems_utf8() method to test text for UTF-8 character encoding but didn't specify how to write such a method. Can anyone suggest a test that might work?...
38
by: Haines Brown | last post by:
I'm having trouble finding the character entity for the French abbreviation for "number" (capital N followed by a small supercript o, period). My references are not listing it. Where would I...
32
by: Wolfgang Draxinger | last post by:
I understand that it is perfectly possible to store UTF-8 strings in a std::string, however doing so can cause some implicaions. E.g. you can't count the amount of characters by length() | size()....
6
by: archana | last post by:
Hi all, can someone tell me difference between unicode and utf 8 or utf 18 and which one is supporting more character set. whic i should use to support character ucs-2. I want to use ucs-2...
7
by: Jimmy Shaw | last post by:
Hi everybody, Is there any SIMPLE way to convert from UTF-16 to UTF-32? I may be mixed up, but is it possible that all UTF-16 "code points" that are 16 bits long appear just the same in UTF-32,...
1
by: sheldon.regular | last post by:
I am new to unicode so please bear with my stupidity. I am doing the following in a Python IDE called Wing with Python 23. äöü äöü '\xc3\xa4\xc3\xb6\xc3\xbc' u'\xe4\xf6\xfc'...
10
by: Jed | last post by:
I have a form that needs to handle international characters withing the UTF-8 character set. I have tried all the recommended strategies for getting utf-8 characters from form input to email...
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is UTF-8 Encoded. I copy and paste some chineese chars...
35
by: Bjoern Hoehrmann | last post by:
Hi, For a free software project, I had to write a routine that, given a Unicode scalar value U+0000 - U+10FFFF, returns an integer that holds the UTF-8 encoded form of it, for example, U+00F6...
4
by: =?ISO-8859-2?Q?Boris_Du=B9ek?= | last post by:
Hi, I have an API that returns UTF-8 encoded strings. I have a utf8 codevt facet available to do the conversion from UTF-8 to wchar_t encoding defined by the platform. I have no trouble...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.