karlgoethebier has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
i have no idea why this example doesn't work as expected:
#!/usr/bin/env perl + + use warnings; use strict; use charnames qw(:full); binmode STDOUT, ":utf8"; print chr( charnames::vianame( qq(MUSIC FLAT SIGN)) ) . qq(\n); print chr( charnames::vianame( qq(GREEK CAPITAL LETTER DELTA)) ) . qq(\n); __END__
On my box Δ is printed and ♭ not (LANG=de_DE.UTF-8).
Update: If i switch my Console font to Apple Symbol it works:
b♭my $flat = chr( charnames::vianame(qq(MUSIC FLAT SIGN)) ); print qq(b$flat);
Observation: If i paste this output from Console to TextEdit and select any available font it is displayed correct. Things It's getting weird...
Thanks for any hint and best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: char names: why can i print GREEK CAPITAL LETTER DELTA but not MUSIC FLAT SIGN?
by Corion (Patriarch) on Oct 03, 2014 at 20:30 UTC | |
by karlgoethebier (Abbot) on Oct 03, 2014 at 21:41 UTC | |
by RedElk (Hermit) on Oct 03, 2014 at 22:21 UTC | |
by karlgoethebier (Abbot) on Oct 04, 2014 at 10:54 UTC |