note
kcott
<p>
Firstly, it seems I gave you something of a bum steer regarding <c>&Unicode::UCD::charprops_all</c>.
I've been using it for a while and forgot that it was a fairly recent function (in terms of Perl versions).
It was added in <c>v5.22.0</c>, along with some other functions, so won't be available on any of the Perl versions
you're using. Sorry about that.
See [http://perldoc.perl.org/perl5220delta.html#Updated-Modules-and-Pragmata|perl5220delta: Updated Modules and Pragmata].
</p>
<p><small><em>[Just a quick note on markup.
While it's generally preferable to use '<c><code></c>' tags for code and data, which you've been doing,
this doesn't work too well with Unicode characters (outside the ASCII range).
In these cases, '<c><pre></c>' tags work better:
for instance, you'll see '<tt>α</tt>' instead of '<c>α</c>'.
For inline text, such as in paragraphs, '<c><tt></c>' tags serve the same purpose.]</em></small></p>
<p>
As I have neither Ubuntu nor AIX, I can't effectively reproduce your results.
However, I looked into this a bit further and have a few other suggestions.
</p>
<p>
As you successfully printed the characters from the codepoints:
</p>
<pre>
$ perl -C -E 'say "\x{3b1} - \x{df} - \x{a3}"'
α - ß - £
</pre>
<p><small><em>[I didn't need it, but you may need to add <c>-Mutf8</c>
to get rid of the "<c>Wide character</c>" message you're seeing.]</em></small></p>
<p>
See what names you get for those characters:
</p>
<code>
$ perl -Mcharnames=:full -E 'say charnames::viacode($_) for (0x3b1, 0xdf, 0xa3)'
GREEK SMALL LETTER ALPHA
LATIN SMALL LETTER SHARP S
POUND SIGN
</code>
<p>
In terms of what you're referring to as <em>"aliases"</em>, I suspect there's a very large number of these.
Have a look at [http://perldoc.perl.org/charnames.html|charnames];
in particular, read what it says about <c>:full</c>, <c>:loose</c> and <c>:short</c>.
There's a link to the algorithm for <c>:loose</c> matching, but it's horribly broken:
it should be "[http://www.unicode.org/reports/tr44/#Matching_Names]".
How <c>:short</c> is determined, is explained on the [http://perldoc.perl.org/charnames.html|charnames] page.
</p>
<p>
<c>:full</c> is fairly straighforward:
</p>
<pre>
$ perl -C -E 'say "\N{GREEK SMALL LETTER ALPHA}"'
α
</pre>
<p>
Based on that [http://www.unicode.org/reports/tr44/#Matching_Names|#Matching_Names] algorithm,
I then tried:
</p>
<code>
$ perl -C -E 'say "\N{greek small letter alpha}"'
Unknown charname 'greek small letter alpha' at -e line 1, within string
Execution of -e aborted due to compilation errors.
</code>
<p>
However, when I specified <c>-Mcharnames=:loose</c>, it worked:
</p>
<pre>
$ perl -Mcharnames=:loose -C -E 'say "\N{greek small letter alpha}"'
α
</pre>
<p>
Bearing in mind the <c>:loose</c> algorithm, you can see there's a huge number of possibilities.
Here's a few examples:
</p>
<pre>
$ perl -Mcharnames=:loose -C -E 'say "\N{GREEK_SMALL_LETTER_ALPHA}"'
α
$ perl -Mcharnames=:loose -C -E 'say "\N{GREEK-SMALL-LETTER-ALPHA}"'
α
$ perl -Mcharnames=:loose -C -E 'say "\N{GREEK-SMALL_LETTER-ALPHA}"'
α
$ perl -Mcharnames=:loose -C -E 'say "\N{greek_small_letter_alpha}"'
α
$ perl -Mcharnames=:loose -C -E 'say "\N{greek-small_letter-alpha}"'
α
$ perl -Mcharnames=:loose -C -E 'say "\N{greek small-letter alpha}"'
α
$ perl -Mcharnames=:loose -C -E 'say "\N{GrEeK SmAlL-LeTtEr aLpHa}"'
α
</pre>
<p>
Now, as shown in my earlier post, I was able to use the <c>:short</c> forms directly:
</p>
<pre>
$ perl -C -E 'say "\N{greek:alpha}"'
α
$ perl -Mcharnames=greek -C -E 'say "\N{alpha}"'
α
</pre>
<p>
They didn't work for you, but maybe these might:
</p>
<pre>
$ perl -Mcharnames=:short -C -E 'say "\N{greek:alpha}"'
α
$ perl -Mcharnames=:short,greek -C -E 'say "\N{alpha}"'
α
</pre>
<p>
I also had a brief look at the source code for <c>charnames.pm</c> and <c>_charnames.pm</c>;
although, I didn't delve into them too deeply.
There's a lot of (non-POD) comments that may be of interest.
Perhaps have a look at those for the versions you're using.
</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-861371">
<p>— Ken</p>
</div></div>
1179897
1179920