I have a fairly basic question.
I am going through the camel book 6th edition. In chapter 2 scalar data one example code is this:
$alef = chr (0x05d0);
I tried to print that with the following but it printed blank lines.
#! /usr/bin/perl
use warnings;
use utf8;
binmode(STDOUT, ":utf8");
#use open qw/:std :utf8/;
$alef = chr(0x05D0);
print $alef;
$alpha = chr(hex('03B1'));
print $alpha;
$omega = chr(0x03C9);
print $omega;
Then I checked the documentation for the UTF-8 and while there isn’t a 05D0, there is a 005D, which would give me a right square bracket ‘]’.
My question is this: was there something that I missed leading to the blank lines or was it just a type on the publisher/author’s part?
and the alpha and omega works find if it weren’t for alef. 🙂
Thanks
Davy
This has nothing to do with UTF-8. These are Unicode characters.
U+05D0: א
U+03B1: α
U+03C9: ω
If you got blank lines, your fonts might not have a glyph for those characters.