From 8016f4f0bbe09309f7f8cc7d4554a42ced0cc532 Mon Sep 17 00:00:00 2001 From: yhirose Date: Thu, 26 Feb 2015 22:06:54 -0500 Subject: [PATCH] Allow UTF8 characters. --- grammar/csv.peg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grammar/csv.peg b/grammar/csv.peg index c915aa4..1f7c58c 100644 --- a/grammar/csv.peg +++ b/grammar/csv.peg @@ -7,12 +7,12 @@ header <- name (COMMA name)* record <- field (COMMA field)* name <- field field <- escaped / non_escaped -escaped <- DQUOTE (TEXTDATA / COMMA / CR / LF / TWO_DQUOTE)* DQUOTE +escaped <- DQUOTE (TEXTDATA / COMMA / CR / LF / D_DQUOTE)* DQUOTE non_escaped <- TEXTDATA* COMMA <- ',' CR <- '\r' DQUOTE <- '"' LF <- '\n' NL <- CR LF / CR / LF -TEXTDATA <- [\x20-\x21] / [\x23-\x2B] / [\x2D-\x7E] -TWO_DQUOTE <- '"' '"' +TEXTDATA <- ![",] . +D_DQUOTE <- '"' '"'