perl 入門 use utf8;とは

Quick Edit Pencil

#!/usr/bin/perl

#Perlの「use utf8;」
#http://ash.roova.jp/cipher/2010/04/perluse-utf8.html

use utf8;
binmode(STDOUT, ":utf8");

#Perlのuse utf8のメモ - CGIのutf-8改造で文字化けしたときの処方箋
#http://my.xrea.cc/data/pc/perl_use_utf8.html

print "Content-type: text/html; charset=UTF-8;\n\n";

my $string = "検索対象の文字列です。";

if ($string =~ /文.列/) {
print "Match!";
} else {
print "Not Match!";
}

print "こんにちは!\n";

#Perl 5.8.x Unicode関連
#http://www.rwds.net/kuroita/program/Perl_unicode.html#utf8

my $unicode = "\x{0x3b1}";
if(utf8::is_utf8($unicode)){print "bingo";}else{print "not bingo";}

#utf8::decode(@lines);
#my $unicode = @lines;
#if(utf8::is_utf8($unicode)){print "bingo";}else{print "not bingo";}

このブログの人気の投稿

PowerShellのGetDetailsOf メソッドでプロパティの詳細情報のID番号と項目名を列挙します

PowerShellで複数ファイルのプロパティを取得する方法(準備編)

ヤバい!JAPANNEXT WQHD対応 27型ワイド液晶ディスプレイ「JN-IPS2716WQHD」を注文してみた!!!

書字方向 横書方向変換スクリプト 左書きから右書きへ(コピペ用途)

Blender: 辺の長さを数値で指定するアドオン

簡単 らじるらじるの聴き逃し番組、NHKラジオのストリーミングを保存・ダウンロードする方法 2019