[Python.NET] Passing .NET strings containing " to Python.NET

Torleif Ringsaker torleif at tordivel.no
Fri Dec 3 17:02:38 CET 2004


Thanks Brian, it turns out there are two different XML encoders/decoders 
doing their stuff, one in C++/MFC and the other in C#/DotNet. Decoding the 
XML on the DotNet side has been identified as the bug's nest.

PythonDotNet is doing just fine on this.

- Torleif

----- Original Message ----- 
From: "Brian Lloyd" <brian at zope.com>
To: "Torleif Ringsaker" <torleif at tordivel.no>; <pythondotnet at python.org>
Sent: Friday, December 03, 2004 4:52 PM
Subject: RE: [Python.NET] Passing .NET strings containing " to Python.NET

>> When sending an XML string containing another XML string, any
>> occurrences of
>> " will cause the reminder of the string to be cut off. Replace
>> any " with ?
>> and the entire string is received. The curious thing is, this
>> only happens
>> when sending from C++/C# to the Python side. Sending the string the other
>> way does not produce the same symptom.
>> Ideas, anyone? Can the translation from a DotNet string to a
>> Python string
>> make this happen?
> Hi Torleif,
> The translation of strings is based on .NET's idea of the length
> of the string, and shouldn't ever be affected by the content of
> the string one way or the other.
> This is a total guess, but I'd suspect that there is some subtle
> escaping problem at the application layer on one side or the
> other...
> Brian Lloyd        brian at zope.com
> V.P. Engineering   540.361.1716
> Zope Corporation   http://www.zope.com

More information about the PythonDotNet mailing list