On 2003/12/13, at 4:02, Rasmus Lerdorf wrote:
On Fri, 12 Dec 2003, Ilia Alshanetsky wrote:That said, the whole space trimming behavior seems a little unusual since it
will corrupt content especially if said content contains binary data. IMHO
the data read by fgetcsv() should be fetched in such a manner so that the
original string can be recreated.
I agree that it would be a good idea to provide a mechanism to do that,
but at this point I don't think we should be changing the behaviour of
fgetcsv() in neither the stable branch nor the HEAD branch. I'd add a new
binary-safe version of the function instead for this. Or an optional arg,
but fgetcsv() already has 2 optional args.
My opinion is basically the same as Ilia's. And I think it'd also be a good idea to introduce a few more option to modify the escaping behaviour. Escape characters like \ are treated specially at the moment, while the de facto specification, of Microsoft, adopts dubbed-quotes style instead of it. IMO we should be able to choose the behaviour.
Then, where do we go from here? Eventually we'll need to change the spec of its arguments, or add a new function as Rasmus said...
Moriyoshi
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php