Browse Source

Added documentation for the escapeChar

Related to #459, which has been solved via #460
pull/511/head
M. Wieschollek 7 years ago committed by Sergi Almacellas Abellana
parent
commit
235981260f
  1. 13
      docs.html

13
docs.html

@ -248,11 +248,12 @@
{ {
quotes: false, quotes: false,
quoteChar: '"', quoteChar: '"',
escapeChar: '"',
delimiter: ",", delimiter: ",",
header: true, header: true,
newline: "\r\n" newline: "\r\n"
}</code></pre> }</code></pre>
Set <code>quotes</code> to <code>true</code> to always enclose each field in quotes, or an array of true/false values correlating to specific to columns to force-quote. The caracter used to quote can be customized using <code>quoteChar</code>. The <code>delimiter</code> can be any valid delimiting character. The <code>newline</code> character(s) may also be customized. Setting <code>header</code> to <code>false</code> will omit the header row. Set <code>quotes</code> to <code>true</code> to always enclose each field in quotes, or an array of true/false values correlating to specific to columns to force-quote. The character used to quote can be customized using <code>quoteChar</code>. The character used to escape the <code>quoteChar</code> within a field can be customized using <code>escapeChar</code>. The <code>delimiter</code> can be any valid delimiting character. The <code>newline</code> character(s) may also be customized. Setting <code>header</code> to <code>false</code> will omit the header row.
</li> </li>
</ul> </ul>
</div> </div>
@ -337,6 +338,7 @@ var csv = Papa.unparse({
delimiter: "", // auto-detect delimiter: "", // auto-detect
newline: "", // auto-detect newline: "", // auto-detect
quoteChar: '"', quoteChar: '"',
escapeChar: '"',
header: false, header: false,
dynamicTyping: false, dynamicTyping: false,
preview: 0, preview: 0,
@ -382,6 +384,7 @@ var csv = Papa.unparse({
The newline sequence. Leave blank to auto-detect. Must be one of \r, \n, or \r\n. The newline sequence. Leave blank to auto-detect. Must be one of \r, \n, or \r\n.
</td> </td>
</tr> </tr>
<tr>
<td> <td>
<code>quoteChar</code> <code>quoteChar</code>
</td> </td>
@ -389,6 +392,14 @@ var csv = Papa.unparse({
The character used to quote fields. The quoting of all fields is not mandatory. Any field which is not quoted will correctly read. The character used to quote fields. The quoting of all fields is not mandatory. Any field which is not quoted will correctly read.
</td> </td>
</tr> </tr>
<tr>
<td>
<code>escapeChar</code>
</td>
<td>
The character used to escape the quote character within a field. If not set, this option will default to the value of <code>quoteChar</code>, meaning that the default escaping of quote character within a quoted field is using the quote character two times. (e.g. <code>"column with ""quotes"" in text"</code>)
</td>
</tr>
<tr> <tr>
<td> <td>
<code>header</code> <code>header</code>

Loading…
Cancel
Save