[issue9200] str.isprintable() is always False for large code points

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: AFAICT, all ctype methods (isalpha, isdigit, etc.) have the same problem. I posted a patch at issue10542 that introduces a Py_UNICODE_NEXT() macro that can help fixing all these methods. I am adding #10542 as a

[issue9200] str.isprintable() is always False for large code points

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Attached patch fixes isprintable and other ctype-like methods. I left isspace() out for now because I could not find a test character outside of BMP to test with, but I think we should fix that for completeness as well.

[issue9200] str.isprintable() is always False for large code points

2010-07-09 Thread Adam Olsen
Adam Olsen rha...@gmail.com added the comment: There should be a way to walk the unicode string in Python too. Afaik there isn't. -- nosy: +Rhamphoryncus ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9200

[issue9200] str.isprintable() is always False for large code points

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A proof of concept patch, which shows the macros used to walk a unicode string and uses them in unicode_repr() (should not change behaviour) and in unicode_isprintable() (should fix the issue). Other functions should be changed the

[issue9200] str.isprintable() is always False for large code points

2010-07-08 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: On narrow unicode builds: unicodedata.category(chr(0x1)) == 'Lo' # correct Py_UNICODE_ISPRINTABLE(0x1)== 1 # correct str.isprintable(chr(0x1)) == False # inconsistent On narrow unicode builds, large code