You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/20 13:43:56 UTC

[GitHub] [arrow] pitrou commented on pull request #11863: ARROW-14906: [C++] Enable CSV Writer to control the type of escape used for quoting

pitrou commented on PR #11863:
URL: https://github.com/apache/arrow/pull/11863#issuecomment-1103950027

   Let me suggest the following API:
   ```c++
     /// \brief Quoting style
     QuotingStyle quoting_style = QuotingStyle::Needed;
   
     /// Whether a quote inside a quoted value is double-quoted (if true)
     /// or escaped using the `escape_char` (if false).
     bool double_quote = true;
   
     /// Escaping character for non-quoted fields.
     char escape_char = kDefaultEscapeChar;
   ```
   
   with the following semantics:
   * if in a quoted field and `double_quote` is true, a quote in a value is double-quoted (i.e. becomes `""`)
   * if in a quoted field and `double_quote` is false, a quote in a value is escape (e.g. becomes `\"` for the default escape char)
   * if in a non-quoted field, any special character (quote, field delimiter, end of line character) is escaped using the escape char
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org