Your SlideShare is downloading. ×
0
use Encode;
                        @xaicron

                       2010/07/23
                yokohama.pm over perlcasua...
• Yuji Shimada /
                • twitter: @xaicron
                • work: DeNA


2010   7   24
2010   7   24
decode


                encode

2010   7   24
2010   7   24
WARNING!!



2010   7   24
• require jcode.pl;
                • use encoding ‘euc-jp’;
                • use open IN => ‘:encoding(euc-jp)’;
       ...
2010   7   24
2010   7   24
what’s Encode?



2010   7   24
2010   7   24
perl
                   flagged utf8


2010   7   24
2010   7   24
2010   7   24
2010   7   24
octet base
                 character base




2010   7   24
Core Module



2010   7   24
maintainer is
                dankogai


2010   7   24
2010   7   24
WARNING!!



2010   7   24
perl 5.8.1
                      5.8.8



2010   7   24
2010   7   24
2010   7   24
decode
                   !

2010   7   24
•       @ARGS

                • STDIN,
                • DB
                • HTTP
                • etc..
2010   7   24
2010   7   24
2010   7   24
encode



2010   7   24
• STDOUT, STDERR
                •
                • DB
                •                HTML

                • etc..
201...
2010   7   24
• decode
                 •

                • encode
                 •


2010   7   24
•

                •



2010   7   24
•

                •   length




2010   7   24
•

                • length
                •          substr   split




2010   7   24
$ perl -E ‘say length “         ”’
           15
           $ perl -MEncode -E ‘say length decode utf8 => “   ”’
         ...
Encode
                use strict;
                use warnings;
                use Encode;

                my $str = de...
2010   7   24
Web
                http://perl-users.jp/articles/advent-calendar/2009/casual/
                                           ...
Upcoming SlideShare
Loading in...5
×

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

850

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

No notes for slide

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

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

    Clipping is a handy way to collect important slides you want to go back to later.

×