Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BBEB17B0F for ; Tue, 7 Oct 2014 13:05:39 +0000 (UTC) Received: (qmail 96524 invoked by uid 500); 7 Oct 2014 13:05:34 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 96364 invoked by uid 500); 7 Oct 2014 13:05:34 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 96006 invoked by uid 99); 7 Oct 2014 13:05:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2014 13:05:33 +0000 Date: Tue, 7 Oct 2014 13:05:33 +0000 (UTC) From: "Mateusz Zakarczemny (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CSV-135) Char escape doesn't work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CSV-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mateusz Zakarczemny updated CSV-135: ------------------------------------ Description: Following code: {code} CSVFormat format = CSVFormat.DEFAULT .withRecordSeparator('\n') .withQuote('"') .withEscape('\\'); CSVPrinter printer = new CSVPrinter(System.out, format); List l = new LinkedList(); l.add("\""); l.add("\n"); l.add("\\"); printer.printRecord(l); {code} produces {quote} """"," ","\" {quote} instead of {quote} "\"","\n","\\\\" {quote} was: Following code: {code} CSVFormat format = CSVFormat.DEFAULT .withRecordSeparator('\n') .withQuote('"') .withEscape('\\'); CSVPrinter printer = new CSVPrinter(System.out, format); List l = new LinkedList(); l.add("\""); l.add("\n"); l.add("\\"); printer.printRecord(l); {code} produces {quote} """"," ","\" {quote} instead of {quote} "\"","\n","\\\" {quote} > Char escape doesn't work > ------------------------ > > Key: CSV-135 > URL: https://issues.apache.org/jira/browse/CSV-135 > Project: Commons CSV > Issue Type: Bug > Components: Printer > Affects Versions: 1.0 > Reporter: Mateusz Zakarczemny > > Following code: > {code} > CSVFormat format = CSVFormat.DEFAULT > .withRecordSeparator('\n') > .withQuote('"') > .withEscape('\\'); > CSVPrinter printer = new CSVPrinter(System.out, format); > List l = new LinkedList(); > l.add("\""); > l.add("\n"); > l.add("\\"); > printer.printRecord(l); > {code} > produces > {quote} > """"," > ","\" > {quote} > instead of > {quote} > "\"","\n","\\\\" > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)