use Encode - yokohama.pm#6 x perl-casual#3

  • 803 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
803
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
1
Comments
0
Likes
0

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. use Encode; @xaicron 2010/07/23 yokohama.pm over perlcasual 2010 7 24
  • 2. • Yuji Shimada / • twitter: @xaicron • work: DeNA 2010 7 24
  • 3. 2010 7 24
  • 4. decode encode 2010 7 24
  • 5. 2010 7 24
  • 6. WARNING!! 2010 7 24
  • 7. • require jcode.pl; • use encoding ‘euc-jp’; • use open IN => ‘:encoding(euc-jp)’; • ( use Jcode ) 2010 7 24
  • 8. 2010 7 24
  • 9. 2010 7 24
  • 10. what’s Encode? 2010 7 24
  • 11. 2010 7 24
  • 12. perl flagged utf8 2010 7 24
  • 13. 2010 7 24
  • 14. 2010 7 24
  • 15. 2010 7 24
  • 16. octet base character base 2010 7 24
  • 17. Core Module 2010 7 24
  • 18. maintainer is dankogai 2010 7 24
  • 19. 2010 7 24
  • 20. WARNING!! 2010 7 24
  • 21. perl 5.8.1 5.8.8 2010 7 24
  • 22. 2010 7 24
  • 23. 2010 7 24
  • 24. decode ! 2010 7 24
  • 25. • @ARGS • STDIN, • DB • HTTP • etc.. 2010 7 24
  • 26. 2010 7 24
  • 27. 2010 7 24
  • 28. encode 2010 7 24
  • 29. • STDOUT, STDERR • • DB • HTML • etc.. 2010 7 24
  • 30. 2010 7 24
  • 31. • decode • • encode • 2010 7 24
  • 32. • • 2010 7 24
  • 33. • • length 2010 7 24
  • 34. • • length • substr split 2010 7 24
  • 35. $ perl -E ‘say length “ ”’ 15 $ perl -MEncode -E ‘say length decode utf8 => “ ”’ 5 2010 7 24
  • 36. Encode use strict; use warnings; use Encode; my $str = decode utf8 => “ ”; # do something... print encode utf8 => $str; 2010 7 24
  • 37. 2010 7 24
  • 38. Web http://perl-users.jp/articles/advent-calendar/2009/casual/ 10.html 2010 7 24