Thank you so much, Christian. -----Message d'origine----- De : Christian Grün [mailto:[email protected]] Envoyé : vendredi 28 novembre 2014 01:15 À : Fabrice Etanchaud Cc : [email protected] Objet : Re: [basex-talk] CSV : escape character feature
Hi Fabrice, my first escaping solution was a bit shortsighted. I have now added a new BACKSLASHES option, which allows you (and everyone else in this little XQuery world) to explicitly turn on backslash escaping [1]. This works both for parsing and serializing CSV. The new snapshot is available in appr. 10 minutes. Have fun, Christian [1] http://docs.basex.org/wiki/CSV_Module On Sat, Nov 15, 2014 at 9:56 PM, Fabrice Etanchaud <[email protected]> wrote: > Thank you so much Christian ! > > -----Message d'origine----- > De : Christian Grün [mailto:[email protected]] > Envoyé : vendredi 14 novembre 2014 20:56 À : Fabrice Etanchaud Cc : > [email protected] > Objet : Re: [basex-talk] CSV : escape character feature > > Hi Fabrice, > > I decided to change the default behavior of the BaseX CSV parser: > backslashes will now always be treated as esape characters. \r, \n and \t > will be encoded as CR, NL, and TAB, and other characters will be returned > literally. A new snapshot is online. > > Everyone: please report if this new default causes surprises in your setting. > > Best, > Christian > > > On Thu, Nov 13, 2014 at 10:34 AM, Fabrice Etanchaud <[email protected]> > wrote: >> Dear all, >> >> I did not find a way to specify how to escape quotes when importing a >> csv file with quotes=yes. >> >> Here is an example : >> >> "12345"|"TOTO LE HERO"|"Toto le héro 3 \"A'' >> LP"|"67"|"8051"|"4000"|"XX"|""|"LU"|""|""|"ITE"|""||"GB"|""|"20.10" >> >> where quotes are escaped with a leading \ (the '' after the A are two >> single quotes). >> >> But it seems BaseX detects quote quote (“”) as escaped quote. >> >> Could it be possible to have in the future an option to override the >> default behavior ? >> >> Best regards, >> Fabrice Etanchaud >> Questel/Orbit

