original commit: 7ed45e1d4087850f5d14caf8ae2cf7fa74b18ec1
This commit is contained in:
Matthew Flatt 2005-05-01 04:08:07 +00:00
parent 93351f0a58
commit cc532ea98d

View File

@ -1276,7 +1276,11 @@
;; --------------------------------------------------
(define reencode-output-port
(opt-lambda (port encoding [error-bytes #f] [close? #f] [name (object-name port)] [buffer-mode 'block])
(opt-lambda (port encoding [error-bytes #f] [close? #f] [name (object-name port)]
[buffer-mode (if (and (output-port? port)
(file-stream-port? port))
(file-stream-buffer-mode port)
'block)])
(let ([c (bytes-open-converter "UTF-8" encoding)]
[ready-bytes (make-bytes 1024)]
[ready-start 0]