From 971b59b7af0acb3443cf9c147eb63ad2f5705bd9 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 7 Apr 2020 07:27:19 +1000 Subject: [PATCH] fix more bugs in CSV reader --- .../src/main/java/org/hl7/fhir/utilities/CSVReader.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java index 9863123a9..de1047020 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java @@ -111,7 +111,11 @@ public class CSVReader extends InputStreamReader { String s = cells.length >= index ? cells[index] : null; if (Utilities.noString(s)) return null; - return s; + if (s.startsWith("\"") && s.endsWith("\"")) { + return s.substring(1, s.length()-2); + } else { + return s; + } } protected boolean parseBoolean(String column) {