SlideShare a Scribd company logo
1 of 38
Download to read offline
use Encode;
                        @xaicron

                       2010/07/23
                yokohama.pm over perlcasual




2010   7   24
• 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)’;
                • ( use Jcode )


2010   7   24
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..
2010   7   24
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 => “   ”’
           5




2010   7   24
Encode
                use strict;
                use warnings;
                use Encode;

                my $str = decode utf8 => “   ”;
                # do something...
                print encode utf8 => $str;




2010   7   24
2010   7   24
Web
                http://perl-users.jp/articles/advent-calendar/2009/casual/
                                           10.html




2010   7   24

More Related Content

Viewers also liked

Publicación en Electromicrobiología
Publicación en ElectromicrobiologíaPublicación en Electromicrobiología
Publicación en ElectromicrobiologíaWulcon_Energy
 
Junk E-mail in Maryland
Junk E-mail in MarylandJunk E-mail in Maryland
Junk E-mail in Marylandhey4ndr3w
 
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
المحسوبية في الإدارة التونسية  بقلم  عزالدين مباركالمحسوبية في الإدارة التونسية  بقلم  عزالدين مبارك
المحسوبية في الإدارة التونسية بقلم عزالدين مباركezzeddine
 
كيف نقضي على المحسوبية في الإدارة التونسية
كيف نقضي على المحسوبية في الإدارة التونسيةكيف نقضي على المحسوبية في الإدارة التونسية
كيف نقضي على المحسوبية في الإدارة التونسيةezzeddine
 
Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014
Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014
Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014Worldcom Public Relations Group
 
Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.
Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.
Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.Cinzia Gallia Schlicksup
 
Обзор рынка коммерческой недвижимости Варшавы 2009
Обзор рынка коммерческой недвижимости Варшавы 2009Обзор рынка коммерческой недвижимости Варшавы 2009
Обзор рынка коммерческой недвижимости Варшавы 2009Твоя столица
 
低コストで英語力を上げる方法
低コストで英語力を上げる方法低コストで英語力を上げる方法
低コストで英語力を上げる方法Yuji Kondo
 
Ssmc dg-3-life impactinglives
Ssmc dg-3-life impactinglivesSsmc dg-3-life impactinglives
Ssmc dg-3-life impactinglivesSSMC
 
Social Strategies: Maximize Your Social Media
Social Strategies: Maximize Your Social MediaSocial Strategies: Maximize Your Social Media
Social Strategies: Maximize Your Social MediaMandy Jenkins
 
On the Hills of Tsarskoye Selo
On the Hills of Tsarskoye SeloOn the Hills of Tsarskoye Selo
On the Hills of Tsarskoye SeloKarim
 

Viewers also liked (14)

Publicación en Electromicrobiología
Publicación en ElectromicrobiologíaPublicación en Electromicrobiología
Publicación en Electromicrobiología
 
Junk E-mail in Maryland
Junk E-mail in MarylandJunk E-mail in Maryland
Junk E-mail in Maryland
 
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
المحسوبية في الإدارة التونسية  بقلم  عزالدين مباركالمحسوبية في الإدارة التونسية  بقلم  عزالدين مبارك
المحسوبية في الإدارة التونسية بقلم عزالدين مبارك
 
كيف نقضي على المحسوبية في الإدارة التونسية
كيف نقضي على المحسوبية في الإدارة التونسيةكيف نقضي على المحسوبية في الإدارة التونسية
كيف نقضي على المحسوبية في الإدارة التونسية
 
Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014
Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014
Tutkimustiivistelmä – Omat sisällöt markkinoinnin ytimenä 2014
 
Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.
Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.
Hike the Salth Paths in Italy: ancient trails from Piedmont to the coast.
 
Обзор рынка коммерческой недвижимости Варшавы 2009
Обзор рынка коммерческой недвижимости Варшавы 2009Обзор рынка коммерческой недвижимости Варшавы 2009
Обзор рынка коммерческой недвижимости Варшавы 2009
 
Wedding Bliss Photography
Wedding Bliss PhotographyWedding Bliss Photography
Wedding Bliss Photography
 
Full report
Full reportFull report
Full report
 
低コストで英語力を上げる方法
低コストで英語力を上げる方法低コストで英語力を上げる方法
低コストで英語力を上げる方法
 
Ssmc dg-3-life impactinglives
Ssmc dg-3-life impactinglivesSsmc dg-3-life impactinglives
Ssmc dg-3-life impactinglives
 
Social Strategies: Maximize Your Social Media
Social Strategies: Maximize Your Social MediaSocial Strategies: Maximize Your Social Media
Social Strategies: Maximize Your Social Media
 
Green Day
Green DayGreen Day
Green Day
 
On the Hills of Tsarskoye Selo
On the Hills of Tsarskoye SeloOn the Hills of Tsarskoye Selo
On the Hills of Tsarskoye Selo
 

More from Yuji Shimada

MySQL データ分割入門
MySQL データ分割入門MySQL データ分割入門
MySQL データ分割入門Yuji Shimada
 
Web API のすすめ
Web API のすすめWeb API のすすめ
Web API のすすめYuji Shimada
 
Let s database_testing
Let s database_testingLet s database_testing
Let s database_testingYuji Shimada
 
YAPC::Asia 2010 / 前夜祭
YAPC::Asia 2010 / 前夜祭YAPC::Asia 2010 / 前夜祭
YAPC::Asia 2010 / 前夜祭Yuji Shimada
 
5分で始める XS - tsukuba.xs#1
5分で始める XS - tsukuba.xs#15分で始める XS - tsukuba.xs#1
5分で始める XS - tsukuba.xs#1Yuji Shimada
 
Modern Commandline Tool
Modern Commandline ToolModern Commandline Tool
Modern Commandline ToolYuji Shimada
 

More from Yuji Shimada (6)

MySQL データ分割入門
MySQL データ分割入門MySQL データ分割入門
MySQL データ分割入門
 
Web API のすすめ
Web API のすすめWeb API のすすめ
Web API のすすめ
 
Let s database_testing
Let s database_testingLet s database_testing
Let s database_testing
 
YAPC::Asia 2010 / 前夜祭
YAPC::Asia 2010 / 前夜祭YAPC::Asia 2010 / 前夜祭
YAPC::Asia 2010 / 前夜祭
 
5分で始める XS - tsukuba.xs#1
5分で始める XS - tsukuba.xs#15分で始める XS - tsukuba.xs#1
5分で始める XS - tsukuba.xs#1
 
Modern Commandline Tool
Modern Commandline ToolModern Commandline Tool
Modern Commandline Tool
 

Recently uploaded

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Recently uploaded (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

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