Most direct way to strip unoprintable characters out of a string?

Fredrik Lundh fredrik at pythonware.com
Sun Sep 25 10:24:13 CEST 2005


George Sakkis wrote:

> No there's not a stripUnprintable in a standard module AFAIK, and
> that's a good thing; if every little function that one might ever wanted
> made it to the standard library, the language would be overwhelming.

...and if there was a stripUnprintable function in the standard library that
was based on C's mostly brain-dead locale model, US programmers
would produce even more web applications that just don't work for non-
US users...

("sanitizing" HTML data by running filters over encoded 8-bit data is hardly
ever the right thing to do...)

</F> 






More information about the Python-list mailing list