From c5f0aeec9330a7c459e99e5ac483007035503db4 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 18 Feb 2015 23:27:35 +0100 Subject: [PATCH] The default DBF encoding still is ASCII. --- src/parsers/command-dbf.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/parsers/command-dbf.lisp b/src/parsers/command-dbf.lisp index e7b3aaa..50ae02e 100644 --- a/src/parsers/command-dbf.lisp +++ b/src/parsers/command-dbf.lisp @@ -67,7 +67,14 @@ (:lambda (clauses-list) (alexandria:alist-plist clauses-list))) -(defrule load-dbf-command (and dbf-source (? file-encoding) +;;; dbf defaults to ascii rather than utf-8 +(defrule dbf-file-encoding (? (and kw-with kw-encoding encoding)) + (:lambda (enc) + (if enc + (bind (((_ _ encoding) enc)) encoding) + :ascii))) + +(defrule load-dbf-command (and dbf-source (? dbf-file-encoding) target load-dbf-optional-clauses) (:lambda (command) (destructuring-bind (source encoding target clauses) command