encode-char ( char stream encoding -- )
Factor handbook » Input and output » I/O encodings » Encoding protocol

Prev:decode-char ( stream encoding -- char/f )


Vocabulary
io.encodings

Inputs
chara character
streaman underlying output stream
encodingan encoding descriptor


Outputs
None

Generic word contract
Writes the code point to the underlying stream in the given encoding.

Notes
Calling this word directly is not necessary in most cases. Higher-level words call it automatically.

See also
decode-char

Definition

GENERIC: encode-char ( char stream encoding -- )


Methods













M:: iso2022-state encode-char ( char stream encoding -- )
char encoding type>> value? [
char find-type
[ stream stream-write ] [ encoding type<< ] bi*
] unless char encoding type>> value-at
stream stream-write-num ;