Handbook
Glossary
with-encoded-output ( encoding quot -- )
Factor handbook
»
Input and output
»
I/O encodings
Prev:
re-decode ( stream encoding -- newstream )
Next:
with-decoded-input ( encoding quot -- )
Vocabulary
io
.
encodings
Inputs
encoding
an encoding descriptor
quot
a
quotation
Outputs
None
Word description
Creates a new encoder with the given encoding descriptor and calls the quotation using this encoder. The original encoder object is restored after the quotation returns and the stream is kept open for future output operations.
Definition
USING:
io
kernel
namespaces
;
IN:
io.encodings
:
with-encoded-output
( encoding quot -- )
[
[
output-stream
get
]
dip
re-encode
]
dip
with-output-stream*
;
inline