AUDIT: r17509 - gnucash/trunk/src/import-export/qif-import - Bug #141003: Revise r17489 to escape the British Pound symbol in Scheme with "\xa3" (for strings) or #\243 (for characters).

Charles Day cedayiv at cvs.gnucash.org
Sun Sep 14 16:03:49 EDT 2008


Author: cedayiv
Date: 2008-09-14 16:03:48 -0400 (Sun, 14 Sep 2008)
New Revision: 17509
Trac: http://svn.gnucash.org/trac/changeset/17509

Modified:
   gnucash/trunk/src/import-export/qif-import/qif-file.scm
   gnucash/trunk/src/import-export/qif-import/qif-objects.scm
   gnucash/trunk/src/import-export/qif-import/qif-parse.scm
Log:
Bug #141003: Revise r17489 to escape the British Pound symbol in Scheme with "\xa3" (for strings) or #\243 (for characters).
BP


Modified: gnucash/trunk/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-file.scm	2008-09-14 17:48:58 UTC (rev 17508)
+++ gnucash/trunk/src/import-export/qif-import/qif-file.scm	2008-09-14 20:03:48 UTC (rev 17509)
@@ -288,7 +288,7 @@
 
                            ;; $ : split amount (if there are splits)
                            ;; Also allowing pound symbol just in case (#141003)
-                           ((#\$ #\£)
+                           ((#\$ #\243)
                             (if (and current-split
                                      (not-bad-numeric-string? value))
                                 (qif-split:set-amount! current-split value)))

Modified: gnucash/trunk/src/import-export/qif-import/qif-objects.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-objects.scm	2008-09-14 17:48:58 UTC (rev 17508)
+++ gnucash/trunk/src/import-export/qif-import/qif-objects.scm	2008-09-14 20:03:48 UTC (rev 17509)
@@ -165,7 +165,7 @@
     self))
 
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  qif-xtn class 
 ;;  [D] date       : parsed. 
 ;;  [P] payee      : string 
@@ -177,8 +177,8 @@
 ;;  [Y] name of security 
 ;;  [O] commission (parsed)
 ;;  [L] category   : string 
-;;  [S]/[E]/[$]/[£] splits : a list of <qif-split>
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  [S]/[E]/[$]/[pound ("\xa3" or #\243)] splits : a list of <qif-split>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define <qif-xtn>
   (make-simple-class 

Modified: gnucash/trunk/src/import-export/qif-import/qif-parse.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-parse.scm	2008-09-14 17:48:58 UTC (rev 17508)
+++ gnucash/trunk/src/import-export/qif-import/qif-parse.scm	2008-09-14 20:03:48 UTC (rev 17509)
@@ -19,13 +19,13 @@
 
 (define decimal-radix-regexp
   (make-regexp
-   "^ *[$£]?[+-]?[$£]?[0-9]+[+-]?$|^ *[$£]?[+-]?[$£]?[0-9]?[0-9]?[0-9]?([,'][0-9][0-9][0-9])*(\\.[0-9]*)?[+-]? *$|^ *[$£]?[+-]?[$£]?[0-9]+\\.[0-9]*[+-]? *$"))
+   "^ *[$\xa3]?[+-]?[$\xa3]?[0-9]+[+-]?$|^ *[$\xa3]?[+-]?[$\xa3]?[0-9]?[0-9]?[0-9]?([,'][0-9][0-9][0-9])*(\\.[0-9]*)?[+-]? *$|^ *[$\xa3]?[+-]?[$\xa3]?[0-9]+\\.[0-9]*[+-]? *$"))
 
 (define comma-radix-regexp
   (make-regexp
-   "^ *[$£]?[+-]?[$£]?[0-9]+[+-]?$|^ *[$£]?[+-]?[$£]?[0-9]?[0-9]?[0-9]?([\\.'][0-9][0-9][0-9])*(,[0-9]*)?[+-]? *$|^ *[$£]?[+-]?[$£]?[0-9]+,[0-9]*[+-]? *$"))
+   "^ *[$\xa3]?[+-]?[$\xa3]?[0-9]+[+-]?$|^ *[$\xa3]?[+-]?[$\xa3]?[0-9]?[0-9]?[0-9]?([\\.'][0-9][0-9][0-9])*(,[0-9]*)?[+-]? *$|^ *[$\xa3]?[+-]?[$\xa3]?[0-9]+,[0-9]*[+-]? *$"))
 
-(define integer-regexp (make-regexp "^[$£]?[+-]?[$£]?[0-9]+[+-]? *$"))
+(define integer-regexp (make-regexp "^[$\xa3]?[+-]?[$\xa3]?[0-9]+[+-]? *$"))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  qif-split:parse-category
@@ -548,7 +548,7 @@
 
 (define (qif-parse:parse-number/format value-string format)
   (let ((minus-index (string-index value-string #\-))
-        (filtered-string (gnc:string-delete-chars value-string "$£'+-")))
+        (filtered-string (gnc:string-delete-chars value-string "$\xa3'+-")))
     (case format
       ((decimal)
        (let* ((read-string (string-remove-char filtered-string #\,))



More information about the gnucash-changes mailing list