Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

opencsv in java ignores backslash (\) in a field value

$
0
0

Hi Experts

 

I am reading a csv file using opencsv.

 

The csv files is seprated by comma (,) and enclosed in double quotes.

 

Test.csv file:

 

ID, Country, ShortName, Quantity

"1", "UK", "Nice\Good", "120"

 

The problem occurs when reading the values of a column ShortName that has the special character backslash (\), this is stripped out of the value.

The value of ShortName becomes: NiceGood.

 

How does opencsv (CSVReader) can be able to read the '\' special character?

 

Your help would be appreciated.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>