ããæåã®ã¦ãã³ã¼ãã®ã³ã¼ããã¤ã³ãã調ã¹ãæ¹æ³
Perl
›
æåã³ã¼ã
›
Unicode
›
ã³ã¼ããã¤ã³ã
use utf8; my $str = 'ã'; # åå é²æ°ã¨ãã¦è¡¨ç¤º printf "%x\n", ord($str);
ãordé¢æ°ã§æåã®ã³ã¼ããã¤ã³ããç¥ããã¨ãã§ãã¾ããprintfé¢æ°ã§%xã¨ãããã©ã¼ãããæå®ããã¦16é²æ°ã§è¡¨ç¤ºãã¦ãã¾ãã
ãåºåçµæã¯ä»¥ä¸ã®ããã«ãªããããã¨ããæåã®ã³ã¼ããã¤ã³ãã¯3042ã§ãããã¨ããããã¾ãã
3042
Data::Dumperã§ç°¡æçã«èª¿ã¹ã
ãData::Dumperã¢ã¸ã¥ã¼ã«ã使ã£ã¦ç°¡æçã«èª¿ã¹ãæ¹æ³ãããã¾ããData::Dumperã¯ASCIIã®ç¯å²ã§ãªãæåã§ããã°ãå é¨æååãåºåããã¨ãã«ãã³ã¼ããã¤ã³ãã«å¤æããããã§ãã
use utf8; my $str = 'ã'; use Data::Dumper; print Dumper $str;
ã以ä¸ã®ããã«ã¦ãã³ã¼ãã®ã³ã¼ããã¤ã³ãã16é²æ°ã§åºåããã¾ãã
$VAR1 = "\x{3042}";