Enviar pesquisa
Carregar
Handling multibyte CSV files in PHP
•
Transferir como ODP, PDF
•
1 gostou
•
2,838 visualizações
D
Daniel_Rhodes
Seguir
Handling multibyte CSV files in PHP using fgetcsv() and setlocale()
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 15
Baixar agora
Recomendados
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
Recomendados
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
Mais conteúdo relacionado
Mais procurados
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
Mais procurados
(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
Destaque
"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
Destaque
(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
Semelhante a 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
Semelhante a 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
Último
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
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
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
Sujit Pal
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Último
(20)
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 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
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
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
Baixar agora