From 9421e06e34c689a3511a3fe889db295540bcf3a5 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Thu, 15 Feb 2018 17:04:23 +0000 Subject: [PATCH] Fix bug #67566: escape parameter in fgetcsv() is sometimes ignored We clarify the actual meaning of $escape. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344268 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/fgetcsv.xml | 12 ++++++++++++ reference/spl/splfileobject/fgetcsv.xml | 12 ++++++++++++ reference/strings/functions/str-getcsv.xml | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/reference/filesystem/functions/fgetcsv.xml b/reference/filesystem/functions/fgetcsv.xml index f40629d3c7..6596f583a7 100644 --- a/reference/filesystem/functions/fgetcsv.xml +++ b/reference/filesystem/functions/fgetcsv.xml @@ -76,6 +76,18 @@ The optional escape parameter sets the escape character (one character only). + + + Usually an enclosure character is escpaped inside + a field by doubling it; however, the escape + character can be used as an alternative. So for the default parameter + values "" and \" have the same + meaning. Other than allowing to escape the + enclosure character the + escape character has no special meaning; it isn't + even meant to escape itself. + + diff --git a/reference/spl/splfileobject/fgetcsv.xml b/reference/spl/splfileobject/fgetcsv.xml index bfc1661ca1..2629f4870f 100644 --- a/reference/spl/splfileobject/fgetcsv.xml +++ b/reference/spl/splfileobject/fgetcsv.xml @@ -46,6 +46,18 @@ The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. + + + Usually an enclosure character is escpaped inside + a field by doubling it; however, the escape + character can be used as an alternative. So for the default parameter + values "" and \" have the same + meaning. Other than allowing to escape the + enclosure character the + escape character has no special meaning; it isn't + even meant to escape itself. + + diff --git a/reference/strings/functions/str-getcsv.xml b/reference/strings/functions/str-getcsv.xml index c83192f53e..fb82acff75 100644 --- a/reference/strings/functions/str-getcsv.xml +++ b/reference/strings/functions/str-getcsv.xml @@ -58,6 +58,18 @@ Set the escape character (one character only). Defaults as a backslash (\) + + + Usually an enclosure character is escpaped inside + a field by doubling it; however, the escape + character can be used as an alternative. So for the default parameter + values "" and \" have the same + meaning. Other than allowing to escape the + enclosure character the + escape character has no special meaning; it isn't + even meant to escape itself. + +