Add escaping support for the conversion from/to CSV.
For the conversion from JSON to CSV, if escape option is true, the
following escapings happen:
1. " is escaped into "".
2. Some characters are escaped into 2-character sequence such as \t (2
characters).
3. Some ISO control characters are escaped into 6-character controls such
as \u008a.
For the conversion from CSV to JSON, escape option is in effect only if
quoted option is true.
1. "" is unescaped into ".
2. 2-character escape sequence for c0 controls such as \t (2 characters)
are unescaped into the character represented by the escape sequence.
3. 6-character escape sequence such as \u008a are also unescaped into the
uicode represented by the escape sequence.
For a input CSV file containing "\\" (4 characters),
1. \ (1 backslash character) is the unescaped result if quoted option and
escape option are true.
2. \\ (2 blashslash characters) is the unescaped result if quoted option is
true and escape option is false.
3. "\\" (1 quotation mark, 2 bashslashs and 1 quotation mark) is resulted
if quoted option is false.
Original issue reported on code.google.com by yaojingguo@gmail.com on 2 May 2010 at 1:05
Original issue reported on code.google.com by
yaojingguo@gmail.com
on 2 May 2010 at 1:05