develooper Front page | perl.perl5.porters | Postings from September 2009

Re: vianame returns either chr or ord

Thread Previous
September 1, 2009 05:42
Re: vianame returns either chr or ord
Message ID:
2009/9/1 karl williamson <>:
> If charnames::vianame is called with a name of the form U+XXXX, it converts
> the result with chr before returning.  With any other name it returns the
> ordinal number.  This seems like a bug to me, but I want to make sure I'm
> not missing something.

It looks like it was deliberate, although possibly accidental. See below.

> I tried looking at the git blame log equivalent for this; and could only
> find the latest instance that the lines have changed.  If I click on what I
> think would take me to the older version, I get a 404 html error.
> The diff at
> shows the latest diff.  I would presume I would click on the 'a' link near
> the top to get to the older file; that gives the 404, as does the 'b' link.

Ah. Interesting. First, that is the first time ive seen that page
mode. I was able to find it viewing the tree of a commit, and then
going into the lib directory, clicking the history link there, and
then using the diff-to-current link, which then lands on a "bob diff"
mode, which apparently has broken cross links to the other view pages.
Ill see if i can figure out a fix, but you can get what you want i
think by doing:

Clicking on the commit link:

and then from there clicking the blame link next to the charnames file
which takes me to:

Which seems to me to be what you wanted. Although the way the blame
works its not that useful. A little digging reveals the "return a char
for U+" was introduced with the first time vianame() started handling

which makes some sense as it was added to support \N{U+...} processing.


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About