2014-02-03 Phil Thompson <p...@riverbankcomputing.com>: > Are you saying that code will fail if a particular Latin-1 string just > happens not to contains any character greater than 127?
PyUnicode_FromKindAndData(PyUnicode_1BYTE_KIND, latin1_str, length) accepts latin1 and ASCII strings. It computes the maximum code point and then use ASCII or latin1 unicode string. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com