Author belopolsky
Recipients belopolsky, benjamin.peterson, ezio.melotti, lemburg, loewis, serhiy.storchaka
Date 2013-06-24.14:58:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372085891.98.0.811610593661.issue18234@psf.upfronthosting.co.za>
In-reply-to
Content
Here is an example of "prior art" that is relevant to this discussion:

"""
charnames::viacode(code)
..
As mentioned above under ALIASES, Unicode 6.1 defines extra names (synonyms or aliases) for some code points, most of which were already available as Perl extensions. All these are accepted by \N{...} and the other functions in this module, but viacode has to choose which one name to return for a given input code point, so it returns the "best" name. To understand how this works, it is helpful to know more about the Unicode name properties. All code points actually have only a single name, which (starting in Unicode 2.0) can never change once a character has been assigned to the code point. But mistakes have been made in assigning names, for example sometimes a clerical error was made during the publishing of the Standard which caused words to be misspelled, and there was no way to correct those. The Name_Alias property was eventually created to handle these situations. If a name was wrong, a corrected synonym would be published for it, using Name_Alias. viacode will return that corrected synonym as the "best" name for a code point. (It is even possible, though it hasn't happened yet, that the correction itself will need to be corrected, and so another Name_Alias can be created for that code point; viacode will return the most recent correction.)

The Unicode name for each of the control characters (such as LINE FEED) is the empty string. However almost all had names assigned by other standards, such as the ASCII Standard, or were in common use. viacode returns these names as the "best" ones available. Unicode 6.1 has created Name_Aliases for each of them, including alternate names, like NEW LINE. viacode uses the original name, "LINE FEED" in preference to the alternate. Similarly the name returned for U+FEFF is "ZERO WIDTH NO-BREAK SPACE", not "BYTE ORDER MARK".
""" <http://perldoc.perl.org/charnames.html#charnames%3a%3aviacode(code)>

If .name() cannot be touched, what about implementing .bestname() with the above semantics?
History
Date User Action Args
2013-06-24 14:58:12belopolskysetrecipients: + belopolsky, lemburg, loewis, benjamin.peterson, ezio.melotti, serhiy.storchaka
2013-06-24 14:58:11belopolskysetmessageid: <1372085891.98.0.811610593661.issue18234@psf.upfronthosting.co.za>
2013-06-24 14:58:11belopolskylinkissue18234 messages
2013-06-24 14:58:11belopolskycreate