Unicode ã®16é²æ°ã®å®ä½åç §ãæ£è¦è¡¨ç¾ãªã©ã§å ã«æ»ã 2008-05-10-3 [Programming] æ®æ®µã¯é©åã«å¦çãããã¦ã¦åé¡ã«ãªããªããã ãã©ã ã¨ãã©ãã²ãããªå±é¢ã§åºä¼ã£ã¦ãã¾ãã®ãã "�" ã¨ããå½¢å¼ã®æååã16é²æ°ã®å®ä½åç §ã§ãã Perl ã§ãã³ã¼ãããæ¹æ³ãã¡ã¢ã pack 㨠Encode::decode ã使ãã¨è¯ãã¿ããã #!/usr/bin/perl use strict; use warnings; use Encode; use utf8; binmode STDOUT, ":utf8"; my $a = "情報時代"; $a =~ s/&#x([0-9A-F]{4});/decode('UCS2', pack('H*', $1))/ge; print "$a\n";
{{#tags}}- {{label}}
{{/tags}}