How to check...

John Zenger john_zenger at yahoo.com
Sat Feb 11 11:37:13 EST 2006


This should be just a matter of determining how your string is encoded 
(ASCII, UTF, Unicode, etc.) and checking the ord of each character to 
see if it is in the contiguous range of English characters for that 
encoding.  For example, if you know that the string is ASCII or UTF-8, 
you could check ord for each character and confirm it is less than 128.

Lad wrote:
> Hello,
> How can I  check that a string does NOT contain NON English characters?
> Thanks
> L.
> 



More information about the Python-list mailing list