Question about string.printable and non-printable characters
Daniel Alexandre
daniel at designspots.com
Tue Mar 15 10:29:57 EST 2005
More information about the Python-list mailing list
Tue Mar 15 10:29:57 EST 2005
- Previous message (by thread): Python CGI discussion Group
- Next message (by thread): Question about string.printable and non-printable characters
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there, I'm using the following method in my program to check whether a message received is printable or not and to strip the non-printable characters: CheckPrintable(self,message): printablemessage = "" for char in message: if char in string.printable: printablemessage = printablemessage + char return printablemessage The method is working fine, except in one detail, it's also stripping the accented letters which I didn't want to happen. Is there a string.printable declaration which contains accented letters? Thanks in advance. If you can, please reply to my email. - -- Best Regards, Daniel Alexandre ( dfcruz at student.dei.uc.pt ) PGP Public Key: http://student.dei.uc.pt/~dfcruz/pubring.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFCNv94L3+DjgQV3LgRAk0yAKDN5lzrXqsVY5zgvZD2X3oGtWS5IwCcCtsA qv5d+KGP3n9Gbx0iUm46f/k= =sw9h -----END PGP SIGNATURE-----
- Previous message (by thread): Python CGI discussion Group
- Next message (by thread): Question about string.printable and non-printable characters
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list