This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, christian.heimes, ezio.melotti, lemburg, pitrou, serhiy.storchaka, vstinner
Date 2015-12-19.23:12:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450566752.3.0.203707885216.issue23997@psf.upfronthosting.co.za>
In-reply-to
Content
For now the error message virtually always contains the name (unless the length of its UTF-8 representation > INT_MAX). With unicode_name_maxlen.patch it doesn't contains the name of length few hundreds or tens characters.

Proposed patch makes the error message always contain the name, but truncated to NAME_MAXLEN bytes.

>>> name = ''.join(map(chr, range(0x2c80, 0x2ce4)))
>>> unicodedata.lookup(name)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: "undefined character name 'ⲀⲁⲂⲃⲄⲅⲆⲇⲈⲉⲊⲋⲌⲍⲎⲏⲐⲑⲒⲓⲔⲕⲖⲗⲘⲙⲚⲛⲜⲝⲞⲟⲠⲡⲢⲣⲤⲥⲦⲧⲨⲩⲪⲫⲬⲭⲮⲯⲰⲱⲲⲳⲴⲵⲶⲷⲸⲹⲺⲻⲼⲽⲾⲿⳀⳁⳂⳃⳄⳅⳆⳇⳈⳉⳊⳋⳌⳍⳎⳏⳐⳑⳒⳓⳔ�...'"
History
Date User Action Args
2015-12-19 23:12:32serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, pitrou, vstinner, christian.heimes, benjamin.peterson, ezio.melotti
2015-12-19 23:12:32serhiy.storchakasetmessageid: <1450566752.3.0.203707885216.issue23997@psf.upfronthosting.co.za>
2015-12-19 23:12:32serhiy.storchakalinkissue23997 messages
2015-12-19 23:12:32serhiy.storchakacreate