Dealing with ' (suds)

dieter dieter at handshake.de
Sat Jun 22 02:10:41 EDT 2013


Ombongi Moraa Fe <moraa.lovetakes2 at gmail.com> writes:

> I'm working with suds to send send messages to smsc. I've notices the
> messages with ' are really not processed on my side (which could mean
> an error occurs somewhere - most probably in my php script). SMSC has also
> asked that I 'take care of the '' as it's the reason my subscribers
> may not be receiving the responses.
>
> How can i 'take care of ' ' so it doesn't give me problems in future?

"'" is one of five so called entity references predefined
by the XML specification. The XML parser (that used by "suds")
should automatically convert it to "'". There should be no need
for your application to do anything special for "'".

Of course, there might be a bug somewhere (in "suds" or its parser).
A deeper analysis would be necessary to verify this assumption
and to locate/fix the bug. Even if this looks more difficult,
I recommend to go this route rather than to try something
special for "'" at the application level.




More information about the Python-list mailing list