- Perl ›
- Character code ›
- Unicode ›
- code point
Expressing Unicode characters with code points
Unicode characters have code points assigned to all characters. In Perl, Unicode characters can be represented using code points.
# a my $str = "\x{3042}";
Note that strings containing Unicode characters represented by code points are always treated as decoded strings, with or without utf8 pragma. In other words, it is already decoded. To output, encode as follows.
use Encode 'encode'; print encode('UTF-8', $str);
For windows, try specifying cp932 as the character code.