From b04709a55aff7e1e669d36fab10de3d1e4b5e395 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 13 Nov 2018 20:47:17 -0800 Subject: [PATCH] Add char-set operation to string output ports, using Unicode. --- src/runtime/string-io.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runtime/string-io.scm b/src/runtime/string-io.scm index 8d60fdfc1..dac7183ed 100644 --- a/src/runtime/string-io.scm +++ b/src/runtime/string-io.scm @@ -164,6 +164,7 @@ USA. (extract-output ,string-out/extract-output) (extract-output! ,string-out/extract-output!) (output-column ,string-out/output-column) + (char-set ,string-out/char-set) (position ,string-out/position) (write-self ,string-out/write-self)) #f)) @@ -195,11 +196,15 @@ USA. (define (string-out/output-column port) (ostate-column (textual-port-state port))) +(define (string-out/char-set port) + (declare (ignore port)) + char-set:unicode) + (define (string-out/position port) ((ostate-builder (textual-port-state port)) 'count)) (define (string-out/write-self port output-port) - port + (declare (ignore port)) (write-string " to string" output-port)) (define (new-column char column) -- 2.25.1