.NETGURU
Deserializing a string with \r\n
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.remoting.

Post a new message to this list...

john west
I serialize a string with char 13 and char 10 in it (\r\n). It's
serialized just fine. When I deserialize it, however, the 13 and 10
is replaced with just a single 10. Here's an example that can be run
in immediate mode showing the problem. The ascii value of the
character in position 2 should be 13, not 10.

?asc(ctype(new XmlSerializer(gettype(String)).Deserialize(new
StringReader("<string>aa" & vbcrlf & "bb</string>")), char())(2))

I'm sure there must be a setting or something. I mean, I know I could
just replace 10 with 13 and 10 after deserializing it, but this is in
a library, and all users aren't going to know to do that. I can't do
it in the library itself, since the object isn't always a string that
I'm deserializing.

Thanks,
John

ps. Don't reply to this email. I don't use it.
Reply to this message...
 
    
john west
I don't want to be annoying, but threads get lost quickly here. Does
anyone have any idea what's going on with this?

Thanks.

Click here to reveal e-mail address (john west) wrote in message news:<Click here to reveal e-mail address>...
[Original message clipped]

Reply to this message...
 
    
Ken Kolda
Since this isn't remoting related, you may have better luck in the VB.NET or
..NET Framework newsgroups.

Ken

"john west" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.IO.StringReader
System.Xml.Serialization.XmlSerializer




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification