It's been a few days since the last comments regarding the fgetcsv()
in PHP
5.0 and I think it would be an opportune time to decide on a solution for the
problem. Based on the various commentary we appear to have 3 alternatives
that for better or worse would resolve the situation.
-
Leave things they way they are now, giving everyone a partial support for
multibyte string infgetcsv()
and 2-3 performance decrease in all instances. -
Backport
fgetcsv()
from 4.3.X tree, giving everyone a fast variant of the
function and introduce a fully multibyte mb_fgetcsv() into mbstring extension
based on the currentfgetcsv()
in PHP 5.0. -
Put the php_mblen macro in php_string.h inside ifdef HAVE_MBSTRING, which
would disable multibyte functionality offgetcsv()
for people without
mbstring support in their installation. This would just about restore
performance and at the same time leave multibyte support for people who need
it (use mbstring extension).
My personal preference is option #2.
Ilia
- Leave things they way they are now, giving everyone a partial
support for
multibyte string infgetcsv()
and 2-3 performance decrease in all
instances.
Of course this is my choice.
- Put the php_mblen macro in php_string.h inside ifdef HAVE_MBSTRING,
which
would disable multibyte functionality offgetcsv()
for people without
mbstring support in their installation. This would just about restore
performance and at the same time leave multibyte support for people
who need
it (use mbstring extension).
Why should we set up a relation to only mbstring extension here? I think
HAVE_ICONV should be take into consideration as well in case we choose
this option after all.
Regards,
Moriyoshi
Moriyoshi Koizumi wrote:
- Leave things they way they are now, giving everyone a partial
support for
multibyte string infgetcsv()
and 2-3 performance decrease in all
instances.Of course this is my choice.
I'm not sure this is what you want because the words "partial support"
seem to be the catch here. I guess Ilia argues that the current way is
broken.
- Chris
Christian Schneider cschneid@cschneid.com wrote:
Moriyoshi Koizumi wrote:
- Leave things they way they are now, giving everyone a partial
support for
multibyte string infgetcsv()
and 2-3 performance decrease in all
instances.Of course this is my choice.
I'm not sure this is what you want because the words "partial support"
seem to be the catch here. I guess Ilia argues that the current way is
broken.
What Ilia is mentioning as "partial support" is that the current
implementation can not handle multibyte delimiters and enclosures,
which I don't find necessary. I've never encountered a real situation
that requires multibyte delimiters or enclosures. Did you read through
the entire thread..?
Moriyoshi