From 88bc51ac9a6455c13525bdf58af7e9ca409d2783 Mon Sep 17 00:00:00 2001 From: Purushottam Khedre Date: Wed, 21 Aug 2024 16:14:40 +0530 Subject: [PATCH] Add support for CSV escape character to EntityDataLoaderImpl --- .../groovy/org/moqui/impl/entity/EntityDataLoaderImpl.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/src/main/groovy/org/moqui/impl/entity/EntityDataLoaderImpl.groovy b/framework/src/main/groovy/org/moqui/impl/entity/EntityDataLoaderImpl.groovy index 36edc7023..adb3869a0 100644 --- a/framework/src/main/groovy/org/moqui/impl/entity/EntityDataLoaderImpl.groovy +++ b/framework/src/main/groovy/org/moqui/impl/entity/EntityDataLoaderImpl.groovy @@ -75,6 +75,7 @@ class EntityDataLoaderImpl implements EntityDataLoader { char csvDelimiter = ',' char csvCommentStart = '#' char csvQuoteChar = '"' + char csvEscapeChar = '\\' String csvEntityName = null List csvFieldNames = null @@ -925,6 +926,7 @@ class EntityDataLoaderImpl implements EntityDataLoader { .withSkipHeaderRecord(true) // TODO: remove this? does it even do anything? .withIgnoreEmptyLines(true) .withIgnoreSurroundingSpaces(true) + .withEscape(edli.csvEscapeChar) .parse(reader) Iterator iterator = parser.iterator()