Soumettre la recherche
Mettre en ligne
Handling multibyte CSV files in PHP
•
Télécharger en tant que ODP, PDF
•
1 j'aime
•
2,838 vues
D
Daniel_Rhodes
Suivre
Handling multibyte CSV files in PHP using fgetcsv() and setlocale()
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 15
Télécharger maintenant
Recommandé
Multibyte string handling in PHP
Multibyte string handling in PHP
Daniel_Rhodes
Symfony live 2017_php7_performances
Symfony live 2017_php7_performances
julien pauli
SymfonyCon 2017 php7 performances
SymfonyCon 2017 php7 performances
julien pauli
Php extensions workshop
Php extensions workshop
julien pauli
Php and threads ZTS
Php and threads ZTS
julien pauli
Presentation of JSConf.eu
Presentation of JSConf.eu
Fredrik Wendt
PHP 7 performances from PHP 5
PHP 7 performances from PHP 5
julien pauli
Php7 extensions workshop
Php7 extensions workshop
julien pauli
Recommandé
Multibyte string handling in PHP
Multibyte string handling in PHP
Daniel_Rhodes
Symfony live 2017_php7_performances
Symfony live 2017_php7_performances
julien pauli
SymfonyCon 2017 php7 performances
SymfonyCon 2017 php7 performances
julien pauli
Php extensions workshop
Php extensions workshop
julien pauli
Php and threads ZTS
Php and threads ZTS
julien pauli
Presentation of JSConf.eu
Presentation of JSConf.eu
Fredrik Wendt
PHP 7 performances from PHP 5
PHP 7 performances from PHP 5
julien pauli
Php7 extensions workshop
Php7 extensions workshop
julien pauli
vertexdb
vertexdb
stevedekorte
Profiling php5 to php7
Profiling php5 to php7
julien pauli
Mysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extension
julien pauli
Writing and using php streams and sockets
Writing and using php streams and sockets
Elizabeth Smith
Better rspec 進擊的 RSpec
Better rspec 進擊的 RSpec
Li Hsuan Hung
vertexdb
vertexdb
stevedekorte
Text expansion in vim
Text expansion in vim
mattboehm
PHP 7 OPCache extension review
PHP 7 OPCache extension review
julien pauli
Building Custom PHP Extensions
Building Custom PHP Extensions
AzRy LLC, Caucasus School of Technology
When e-commerce meets Symfony
When e-commerce meets Symfony
Marc Morera
PHP
PHP
Basavaraj Hampali
Ruby as a glue language
Ruby as a glue language
quakewang
Understanding PHP objects
Understanding PHP objects
julien pauli
Understanding PHP memory
Understanding PHP memory
julien pauli
JavaScript Essentials for Ember development
JavaScript Essentials for Ember development
Leo Hernandez
Php engine
Php engine
julien pauli
The Php Life Cycle
The Php Life Cycle
Xinchen Hui
Python master class 2
Python master class 2
Chathuranga Bandara
RabbitMQ for Perl mongers
RabbitMQ for Perl mongers
Lenz Gschwendtner
Install debian 5 lenny
Install debian 5 lenny
Santo Berwibawa
"Character sets and iconv" PHP source code
"Character sets and iconv" PHP source code
Daniel_Rhodes
Data localization and translation
Data localization and translation
Motti Danino
Contenu connexe
Tendances
vertexdb
vertexdb
stevedekorte
Profiling php5 to php7
Profiling php5 to php7
julien pauli
Mysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extension
julien pauli
Writing and using php streams and sockets
Writing and using php streams and sockets
Elizabeth Smith
Better rspec 進擊的 RSpec
Better rspec 進擊的 RSpec
Li Hsuan Hung
vertexdb
vertexdb
stevedekorte
Text expansion in vim
Text expansion in vim
mattboehm
PHP 7 OPCache extension review
PHP 7 OPCache extension review
julien pauli
Building Custom PHP Extensions
Building Custom PHP Extensions
AzRy LLC, Caucasus School of Technology
When e-commerce meets Symfony
When e-commerce meets Symfony
Marc Morera
PHP
PHP
Basavaraj Hampali
Ruby as a glue language
Ruby as a glue language
quakewang
Understanding PHP objects
Understanding PHP objects
julien pauli
Understanding PHP memory
Understanding PHP memory
julien pauli
JavaScript Essentials for Ember development
JavaScript Essentials for Ember development
Leo Hernandez
Php engine
Php engine
julien pauli
The Php Life Cycle
The Php Life Cycle
Xinchen Hui
Python master class 2
Python master class 2
Chathuranga Bandara
RabbitMQ for Perl mongers
RabbitMQ for Perl mongers
Lenz Gschwendtner
Install debian 5 lenny
Install debian 5 lenny
Santo Berwibawa
Tendances
(20)
vertexdb
vertexdb
Profiling php5 to php7
Profiling php5 to php7
Mysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extension
Writing and using php streams and sockets
Writing and using php streams and sockets
Better rspec 進擊的 RSpec
Better rspec 進擊的 RSpec
vertexdb
vertexdb
Text expansion in vim
Text expansion in vim
PHP 7 OPCache extension review
PHP 7 OPCache extension review
Building Custom PHP Extensions
Building Custom PHP Extensions
When e-commerce meets Symfony
When e-commerce meets Symfony
PHP
PHP
Ruby as a glue language
Ruby as a glue language
Understanding PHP objects
Understanding PHP objects
Understanding PHP memory
Understanding PHP memory
JavaScript Essentials for Ember development
JavaScript Essentials for Ember development
Php engine
Php engine
The Php Life Cycle
The Php Life Cycle
Python master class 2
Python master class 2
RabbitMQ for Perl mongers
RabbitMQ for Perl mongers
Install debian 5 lenny
Install debian 5 lenny
En vedette
"Character sets and iconv" PHP source code
"Character sets and iconv" PHP source code
Daniel_Rhodes
Data localization and translation
Data localization and translation
Motti Danino
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
Number series
Number series
Are Lavanya
Number Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short Tricks
Entrance Exam Info
Php Docs
Php Docs
Pablo Viquez
Multi language for php with gettext
Multi language for php with gettext
Binh Quan Duc
The Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
Problem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data Structures
Yi-Lung Tsai
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
People code events flowchart
People code events flowchart
Satish Ap
Internationalisation with PHP and Intl
Internationalisation with PHP and Intl
Daniel_Rhodes
Logical reasoning number series
Logical reasoning number series
Praveesh Palakeel
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
klirantga
Cmp104 lec 7 algorithm and flowcharts
Cmp104 lec 7 algorithm and flowcharts
kapil078
Data Structure & Algorithms | Computer Science
Data Structure & Algorithms | Computer Science
Transweb Global Inc
Basics of computer science
Basics of computer science
Paul Schmidt
RSA Algorithm
RSA Algorithm
West University of Timisoara
Computer Science & Information Systems
Computer Science & Information Systems
Luis Borges Gouveia
C Programming
C Programming
Rumman Ansari
En vedette
(20)
"Character sets and iconv" PHP source code
"Character sets and iconv" PHP source code
Data localization and translation
Data localization and translation
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
Number series
Number series
Number Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short Tricks
Php Docs
Php Docs
Multi language for php with gettext
Multi language for php with gettext
The Big Documentation Extravaganza
The Big Documentation Extravaganza
Problem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data Structures
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
People code events flowchart
People code events flowchart
Internationalisation with PHP and Intl
Internationalisation with PHP and Intl
Logical reasoning number series
Logical reasoning number series
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Cmp104 lec 7 algorithm and flowcharts
Cmp104 lec 7 algorithm and flowcharts
Data Structure & Algorithms | Computer Science
Data Structure & Algorithms | Computer Science
Basics of computer science
Basics of computer science
RSA Algorithm
RSA Algorithm
Computer Science & Information Systems
Computer Science & Information Systems
C Programming
C Programming
Similaire à Handling multibyte CSV files in PHP
Streams of information - Chicago crystal language monthly meetup
Streams of information - Chicago crystal language monthly meetup
Brian Cardiff
Re-imaginging CakePHP
Re-imaginging CakePHP
Graham Weldon
Exploitation Crash Course
Exploitation Crash Course
UTD Computer Security Group
What does OOP stand for?
What does OOP stand for?
Colin Riley
A Life of breakpoint
A Life of breakpoint
Hajime Morrita
ITB2019 Real World Scenarios for Modern CFML - Nolan Erck
ITB2019 Real World Scenarios for Modern CFML - Nolan Erck
Ortus Solutions, Corp
Intro to OOP
Intro to OOP
Gant Laborde
Virtual Separation of Concerns (2011 Update)
Virtual Separation of Concerns (2011 Update)
chk49
Simplify Localization with Design Pattern Automation
Simplify Localization with Design Pattern Automation
Yan Cui
DOD 2016 - Tomasz Torcz - The Song of JBoss and Chef
DOD 2016 - Tomasz Torcz - The Song of JBoss and Chef
PROIDEA
Os Worthington
Os Worthington
oscon2007
Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)
jeffz
The State of PHPUnit
The State of PHPUnit
Edorian
Oracle OSB Tutorial 3
Oracle OSB Tutorial 3
Rakesh Gujjarlapudi
Planet of the AOPs
Planet of the AOPs
James Ward
Creating your own Abstract Processor
Creating your own Abstract Processor
Aodrulez
openFrameworks 007 - GL
openFrameworks 007 - GL
roxlu
JNA - Let's C what it's worth
JNA - Let's C what it's worth
Idan Sheinberg
Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible Java
Charles Nutter
Down the Rabbit Hole: An Adventure in JVM Wonderland
Down the Rabbit Hole: An Adventure in JVM Wonderland
Charles Nutter
Similaire à Handling multibyte CSV files in PHP
(20)
Streams of information - Chicago crystal language monthly meetup
Streams of information - Chicago crystal language monthly meetup
Re-imaginging CakePHP
Re-imaginging CakePHP
Exploitation Crash Course
Exploitation Crash Course
What does OOP stand for?
What does OOP stand for?
A Life of breakpoint
A Life of breakpoint
ITB2019 Real World Scenarios for Modern CFML - Nolan Erck
ITB2019 Real World Scenarios for Modern CFML - Nolan Erck
Intro to OOP
Intro to OOP
Virtual Separation of Concerns (2011 Update)
Virtual Separation of Concerns (2011 Update)
Simplify Localization with Design Pattern Automation
Simplify Localization with Design Pattern Automation
DOD 2016 - Tomasz Torcz - The Song of JBoss and Chef
DOD 2016 - Tomasz Torcz - The Song of JBoss and Chef
Os Worthington
Os Worthington
Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)
The State of PHPUnit
The State of PHPUnit
Oracle OSB Tutorial 3
Oracle OSB Tutorial 3
Planet of the AOPs
Planet of the AOPs
Creating your own Abstract Processor
Creating your own Abstract Processor
openFrameworks 007 - GL
openFrameworks 007 - GL
JNA - Let's C what it's worth
JNA - Let's C what it's worth
Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible Java
Down the Rabbit Hole: An Adventure in JVM Wonderland
Down the Rabbit Hole: An Adventure in JVM Wonderland
Dernier
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Dernier
(20)
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Handling multibyte CSV files in PHP
1.
Handling multibyte CSV
files in PHP using fgetcsv() and setlocale() By Daniel Rhodes of Warp Asylum ( www.warpasylum.co.uk )
2.
3.
There is no
mb_fgetcsv() !
4.
But “Locale setting
is taken into account” by fgetcsv()
5.
Let's see what
we can do...
6.
7.
Our database
8.
Our PHP files
9.
Our HTML output
10.
But we need
to process the following CSV file which is in EUC-JP encoding...
11.
The CSV file
12.
The CSV file
source
13.
14.
The first attempt
15.
16.
Let's try setting
mbstring.internal_encoding to that of our CSV file, EUC-JP...
17.
Let's try again
18.
19.
Let's try using
the setlocale() function...
20.
Using setlocale()
21.
22.
Just out of
curiousity, let's remove the Japanese directive settings for mbstring and see if it still works...
23.
Out of curiousity...
24.
25.
Set locale to
that of CSV file
26.
Note that setlocale()
doesn't permanently affect the system locale setting
27.
Mbstring settings not
important
28.
Mbstring itself not
actually needed!
29.
30.
Specified locale for
setlocale() must be supported by OS of PHP server
31.
Quoting string fields
in the source CSV file may help enormously – so much so that setlocale() is not needed!
32.
Questions welcome at
daniel.rhodes@warpasylum.co.uk
Télécharger maintenant