Unicode and newline characters in XML text sond via Web Service

  • Thread starter Krzysztof Fink-Finowicki via .NET 247
  • Start date
K

Krzysztof Fink-Finowicki via .NET 247

Hi,

I fill-in text in TEXTAREA tag on HTML page, then send its content via content of XML element parameter sent through WebService function from JavaScript.

On client side, I can read my text in debugger as:

<Text>?Omr?de?
?hj?lp?</Text>

(with literal newline).

On server side, transferred content of XML tag looks as:

<Text>???Omr??de???
???hj??lp???</Text>

(the newline character is displayed in Notepad as single square).

Server side text is then stored to database.

This effect causes:
- differences between client and server texts regarding newline characters;
- loss of national characters.

How and where should I set encoding parameters for Web Service transmission to overcome these problems ?


Please help.

Krzysztof
 
D

Dan Rogers

Hi,

I think you may need to consider that cross-language applications based on
the XML standard will need to work with encoded characters as Unicode.
This is how these productions are handled in XML - so you need to add a
layer to your application's rendering logic to urlDecode the strings you
get back - especially if you're processing the XML manually.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: Krzysztof Fink-Finowicki via .NET 247 <[email protected]>
X-Newsreader: AspNNTP 1.50 (Matthew Reynolds Consulting)
Subject: Unicode and newline characters in XML text sond via Web Service
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Date: Wed, 22 Dec 2004 15:53:39 -0800
NNTP-Posting-Host: 81-86-69-114.dsl.pipex.com 81.86.69.114
Lines: 1
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
..phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:27361
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

Hi,

I fill-in text in TEXTAREA tag on HTML page, then send its content via
content of XML element parameter sent through WebService function from
JavaScript.
On client side, I can read my text in debugger as:

<Text>?Omr?de?
?hj?lp?</Text>

(with literal newline).

On server side, transferred content of XML tag looks as:

<Text>???Omr??de???
???hj??lp???</Text>

(the newline character is displayed in Notepad as single square).

Server side text is then stored to database.

This effect causes:
- differences between client and server texts regarding newline characters;
- loss of national characters.

How and where should I set encoding parameters for Web Service
transmission to overcome these problems ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top