Xml and carriage return

  • Hi,

    I have insert in a multiline text column (varchar(1000)),

    I use a XML ntext parameter and OPENXML, for update tables, all fields are modified successfully but those columns with carriage return and new line (CHAR(13) + CHAR(10)) dont work, CHAR(13) is omitted.

    Field see like that: Some text♫OtherText.

    I test xml with several encodings but none works, even I change type column to nvarchar but neither.

    Please help me or explain me.

    Note: I have a lot of procedures and I wouldnt change all.

    Thanks.

  • How are you viewing the data?

    If you see this in enterprise manager returning rows text?OtherText then that ? is indicating the newline character.

    I believe your updates are working,

    If you use Query analyzer and select query results in text do a select * from Mytable you should then see the data presented with the newline.

    Its just how your looking at the data, I'm sure sql has saved the character

  • Thanks for your comment, here un excerpt from MSDN Library:

    "End of Line Handling

    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."

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

     

     

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply