Bug #141003: Revise r17489 to escape the British Pound symbol in Scheme with "\xa3" (for strings) or #\243 (for characters).

BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17509 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Charles Day 2008-09-14 20:03:48 +00:00
parent 8e9551af98
commit e803ad8245
3 changed files with 8 additions and 8 deletions

View File

@ -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)))

View File

@ -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

View File

@ -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 #\,))