Changeset 34889 in project


Ignore:
Timestamp:
11/12/17 00:08:23 (3 years ago)
Author:
Kon Lovett
Message:

fix quoting when sep char , fix quoting when # or ???

Location:
release/4/csv-xml/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/4/csv-xml/trunk/csv-out.impl

    r34886 r34889  
    154154            always-quote?
    155155            (quote-doubling? str)
     156            (and separator-char (string-index str separator-char))
    156157            (and quote-controls? (string-index str char-set:iso-control))) )
    157158        ;
     
    174175            (csv-line-object->string (number->string obj)) )
    175176          (else
    176             (->string obj) ) ) )
     177            (csv-line-object->string (->string obj)) ) ) )
    177178      ;
    178179      (lambda (obj)
  • release/4/csv-xml/trunk/csv-xml.scm

    r34884 r34889  
    3333(import scheme)
    3434
    35 (import (except chicken provide))
     35#;(import (except chicken provide))
     36(import chicken)
    3637
    3738;;;
  • release/4/csv-xml/trunk/csv-xml.setup

    r34884 r34889  
    55(verify-extension-name "csv-xml")
    66
    7 (setup-shared+static-extension-module (extension-name) (extension-version "0.12.0")
     7(setup-shared+static-extension-module (extension-name) (extension-version "0.12.1")
    88  #:types? #t
    99  #:inline? #t
  • release/4/csv-xml/trunk/tests/run.scm

    r34884 r34889  
    171171  (call-with-output-string
    172172   (lambda (out)
    173      (let ((writer (writer-spec separator-char: delimiter)))
     173     (let ((writer (writer-spec separator-char: delimiter always-quote?: #f)))
    174174       (list->csv rows (make-csv-writer out writer))))))
    175175
     
    178178(let* ((delimiter #\,)
    179179       (csv (write-csv rows delimiter)))
    180   ;(printf "Serialized form:\n~a\n" csv)
     180  (printf "Serialized form (always-quote?: #f):\n~a\n" csv)
    181181  (let ((result (read-csv csv delimiter)))
    182182    (test "Roundtrip" rows result) ) )
Note: See TracChangeset for help on using the changeset viewer.