Dear PerlMonks,
I have found that I can print some Unicode characters to stdout but not all. I'm not sure why there is a difference.
I am using perl 5.22 under Cygwin on a 64-bit Windows 10 PC.
My code excerpt is as follows:
What I get is the following:binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); print length("\N{LATIN CAPITAL LETTER A}\N{COMBINING ACUTE ACCENT}"), +"\n"; print "\N{LATIN CAPITAL LETTER A}\N{COMBINING ACUTE ACCENT}", "\n"; my $smiley_from_name = "\N{WHITE SMILING FACE}"; my $smiley_from_code_point = "\N{U+263a}"; print $smiley_from_name, "\n"; print $smiley_from_code_point, "\n"; my $dui = "\N{U+5C0D}"; print $dui, "\n"; die "\n", "\N{U+5C0D}", "\N{U+4E0D}", "\N{U+8D77}", ", the file $targe +t_file does not exist.\n\n" unless -e $target_file;
What I expected to get was the following:
2So I am unable to figure out why some code points work just fine while others display only as ?.
Any suggestions?In reply to printing Unicode works for some characters but not all by fireblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |