Re: Preventing control characters from entering an XML file

2006-01-05 Thread Scott David Daniels
Frank Niessink wrote: > Scott David Daniels wrote: >> Frank Niessink wrote: >>> - What is the easiest/most pythonic (preferably build-in) way of >>> checking a unicode string for control characters and weeding those >>> characters out? >> drop_controls = [None] * 0x20 >> for c in '\t\r\

Re: Preventing control characters from entering an XML file

2006-01-05 Thread Frank Niessink
Scott David Daniels wrote: > Frank Niessink wrote: > >>- What is the easiest/most pythonic (preferably build-in) way of >>checking a unicode string for control characters and weeding those >>characters out? > > > drop_controls = [None] * 0x20 > for c in '\t\r\n': > drop_cont

Re: Preventing control characters from entering an XML file

2006-01-01 Thread Scott David Daniels
Frank Niessink wrote: > ... > Character Range > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | > [#x1-#x10]" > > - What is the easiest/most pythonic (preferably build-in) way of > checking a unicode string for control characters and weeding those > characters out? dr

Preventing control characters from entering an XML file

2006-01-01 Thread Frank Niessink
Hi list, First of all, I wish you all a happy 2006. I have a small question that googling didn't turn up an answer for. So hopefully you'll be kind enough to send me in the right direction. I'm developing a desktop application, called Task Coach, that saves its domain objects (tasks, mostly :-