Your SlideShare is downloading. ×
MT5の日本語化ハマりポイントの解説
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

MT5の日本語化ハマりポイントの解説

2,899
views

Published on

Published in: Technology, Spiritual

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,899
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. MT5の日本語化ハマりポイント スカイアークシステム 上西 宏幸(pirolix) 2009/12/09
  • 2. MT5での文字列の扱い  MT4以前: $stringは単なるバイト列  MT5: Perl内部表現形式(Unicode)  utf8::is_utf8($string) → true  use utf8;  ソースコード中の文字列がUTF8になる  マルチバイトの変数名なども使える
  • 3. Unicodeの表現  use utf8; my $alpha = "α";  my $alpha = "¥x{3b1}";  my $alpha = chr(0x3b1);  my $alpha = pack("U", 0x3b1);
  • 4. Unicodeの表示  my $alpha = “¥x{3b1}”; print $alpha; → Wide character in print at XXX.pl line X.  my $alpha = "¥x{3b1}"; utf8::encode($alpha); print $alpha;
  • 5. 互換性を持った書き方  require utf8 if 5 <= $MT::VERSION;  ×use utf8 if 5 <= $MT::VERSION;  $string = 5 <= $MT::VERSION ? Encode::encode($string) : $string;
  • 6. こんな時  外部サイトから取得したデータ(RSSなど)をサ イトに表示する  テーブルのデータをファイルに書き出す