all groups > sql server programming > july 2005 >
You're in the

sql server programming

group:

Xml and multiline text


Xml and multiline text Jose
7/18/2005 5:50:01 PM
sql server programming:
Hi,
I have a multiline column which write from xml send by ntext parameter,
problem is in lines separatror, because carriage return char -CHAR(13)- is
omitted, only line feed char(10) is witten. Column is show like this:
Text♫Another Text...
I had use enconding uft-16, utf-8 but neither works.
Why happens this? Any solution?.
RE: Xml and multiline text John Bell
7/18/2005 11:51:02 PM
Hi

From:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/59fa28d7-85f9-4f61-9216-d01ad999b8c5.asp

"XML processors treat the character sequence Carriage Return-Line Feed
(CRLF) like single CR or LF characters. All are reported as a single LF
character. Applications can save documents using the appropriate line-ending
convention."

Therefore this should not be a problem!

John

[quoted text, click to view]
Re: Xml and multiline text Aaron Bertrand [SQL Server MVP]
7/18/2005 11:56:56 PM
Is there anywhere between initial insert and eventual select where you can
replace CHAR(10) with CHAR(13)+CHAR(10)? Where is the CHAR(13) getting
removed? Is it by the app that loads the data into the table, or the app
that pulls the data out of the table? Worse comes to worse, you could brute
force replace right inside the DB, but I suspect this will only fix the
issue for existing data (unless you've already ensured that such data won't
enter again).

http://www.aspfaq.com/2445


[quoted text, click to view]

RE: Xml and multiline text Jose
7/19/2005 7:35:04 AM
Thaks John, but yes, is a problem, when I get this field by select I set it
in a property using a vb.net application, more exactly I use a multiline
textbox by text property, this is shown: Text♫Another Text.
I have a lot of programs and store procedures that treat with this xml issue.

Any suggestion?

[quoted text, click to view]
Re: Xml and multiline text Aaron Bertrand [SQL Server MVP]
7/19/2005 10:48:19 AM
[quoted text, click to view]

So before you display it in vb.net, use vb.net to replace CHR(10) with
CHR(13)+CHR(10) or CrLf.

A

AddThis Social Bookmark Button