Re: Re: Regarding the latest patch on fgetcsv() (stable branch)
| From: | Moriyoshi Koizumi | Date: | Fri, 12 Dec 2003 22:38:58 +0000 |
| Subject: | Re: Re: Regarding the latest patch on fgetcsv() (stable branch) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6379@lists.php.net to get a copy of this message | ||
On 2003/12/13, at 7:28, Ilia Alshanetsky wrote:
On December 12, 2003 04:18 pm, Moriyoshi Koizumi wrote:I admit that few requests are in sight, but it's the case that those who really want that support don't advocate it in English. And I don't think fgetcsv() is an exception, since htmlentities() can be referred to as an example that is placed in core and supports multibyte strings. As I mentioned, purging that kind of functionality into the mbstring extension doesn't solve the problem in practice by any means.I disagree, because of the following reasons: 1) Not a few people *actually* use fgetcsv() commonlyPeople have lived without multibyte support in fgetcsv() for many years now, and I did not see a single request on bugs.php.net for fgetcsv() multi-byte support. So, while this is certainly useful functionality I do not believe it is as widely needed as you say it is. We also have a multibyte extension that already implements multi-byte safe variants of common functions, why make exception for fgetcsv() and add multibyte code into core?with multibyte characters indeed. Regarding this, applications made by those who don't use such characters don't (and won't) use multibyte specific functions and that's the problem. This greatly prevents them from being portable.
If there are virtually no ways to improve it, it'd be natural to me we dismiss the issue.2) IMO speed is not a key factor here. People rather wantsWhen it's a few percent and the changes offer significant improvements yes, but when were are talking about a performance loss of 250-300% or more then performance must become a consideration as well.trust-worthy behaviour.
One thing I'm talking about here is escaping behaviour, which I mentioned in the previous mail. Moriyoshi3) fgetcsv() implementation in the stable branch isWhat features are we talking about here? The only 2 features I can see we may wish to add are >1 char long enclosures and separators and the binary thing. Both of these features would be fairly trivial to add.now too complicated to add a new feature to and also hard to maintain. We should be able to eliminate the mblen() calls for acceptable performance. See the attached result.