Open GoogleCodeExporter opened 9 years ago
cc higepon.
Original comment by oku...@gmail.com
on 9 Jan 2011 at 1:36
Fixed.
https://github.com/higepon/mosh/commit/301fec9454bb46b78b2d2ffc13de609e7444aa65
Original comment by hige...@gmail.com
on 9 Jan 2011 at 1:54
There is still something wrong:
$ mosh-script proof.sps
"x10FFFF; x1;"
$ cat proof.sps
#!r6rs
(import (rnrs))
(let-values (((port getter) (open-string-output-port)))
(display #\x0010FFFF port)
(display " " port)
(display #\x000000001 port)
(write (getter)))
(newline)
Original comment by mrc....@gmail.com
on 5 Feb 2011 at 9:23
reopened.
DISPLAY might escape unprintable chars(except whitespaces and returns).
Because their displaying representation is not specified in R6RS...
If you really want to do this (in R6RS portable way), use put-char or
put-string instead.
prism:check oku$ nmosh check.sps
"\x10FFFF; \x1;"
prism:check oku$ cat check.sps
#!r6rs
(import (rnrs))
(let-values (((port getter) (open-string-output-port)))
(put-char port #\x0010FFFF)
(put-string port " ")
(put-char port #\x000000001)
(write (getter)))
(newline)
IMO, these should be handled with transcoders and (display <char>) should be
equivalent with put-char
as subject of this bug says.
Original comment by oku...@gmail.com
on 5 Feb 2011 at 10:19
I confirmed the problem using this:
#!r6rs
(import (rnrs)
(srfi :8) (srfi :42))
(define (check id)
(let ((c (integer->char id)))
(define (using-display port return)
(display c port)
(return))
(define (using-put-char port return)
(put-char port c)
(return))
(let ((dsp (call-with-values open-string-output-port using-display))
(pcr (call-with-values open-string-output-port using-put-char)))
(unless (string=? dsp pcr)
(write (list 'ID: id dsp pcr)) (newline)))))
(do-ec (: i 0 #xd800)
(check i))
(do-ec (: i #xe000 #x110000)
(check i))
Original comment by oku...@gmail.com
on 5 Feb 2011 at 10:37
Original comment by hige...@gmail.com
on 26 Apr 2011 at 1:57
Original issue reported on code.google.com by
oku...@gmail.com
on 9 Jan 2011 at 1:16