• No : 24318
  • Open Date : 2016/06/13 14:17
  • 更新日時 : 2020/10/06 15:27
  • Print

[DataSpider Servista] When using CSV File Adapter, one double quote becomes two double quotes automatically

When the data that includes ["(double quote)] is output with CSV file adapter, one double quote becomes two double quotes automatically. What is the reason?
 
Category : 

Answer

When there is a variable-length adapter, it is possible to output without escaping the double-quotation in the variable-length write process.
 
For variable-length write process, please refer to the links given in Reference Information.
The operation mentioned in your question will be the CSV adapter specifications. When write data includes ["] then the output will be [" "].
(Thus, it is called Escape where double-quotation is attached to the double-quotation)
The above-mentioned will be the specification in accordance with official specification(RFC). For RFC of CSV, please refer to "Reference Information".
 
Handling method
  • To display by excluding the double-quotation
For example, if you want to display the data ["aa] as [aa] then use the logic that replaces the strings such as replacing logic for each string, and it can be achieved by replacing double-quotation for the null character.
 
There are multiple logics for replacing the strings. Hence, for more details, please check the links given in Reference Information.
  • To display the double-quotation as such
When there is a variable-length adapter, it is possible to output without escaping the double-quotation in the variable-length write process.
 
For variable-length write process, please refer to the links given in Reference Information.
 
 
Escape of double-quotation
 
Below description is found in "2. Definition of the CSV Format" in the above-mentioned site.
 
7.  If double-quotes are used to enclose fields, then a double-quote
     appearing inside a field must be escaped by preceding it with
     another double quote.
 
Logic to replace the strings
 
 
Replacement for each string
Replacement according to CSV file
Replacement according to DB table
 
Variable-length Adapter
 
Variable-length file write 
Variable-length write wizard