mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
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:
parent
8e9551af98
commit
e803ad8245
@ -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)))
|
||||
|
@ -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
|
||||
|
@ -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 #\,))
|
||||
|
Loading…
Reference in New Issue
Block a user