Handbook
Glossary
utf8-bom ( -- utf8-bom )
Factor handbook
»
Input and output
»
I/O encodings
»
Encoding descriptors
»
UTF-8 encoding
Prev:
utf8
Vocabulary
io
.
encodings
.
utf8
Definition
IN:
io.encodings.utf8
TUPLE:
utf8-bom
bom?
;
USING:
kernel
;
IN:
io.encodings.utf8
:
utf8-bom
( -- utf8-bom )
f
\
utf8-bom
boa
;
Methods
USING:
io
io.encodings
io.encodings.utf8
kernel
;
M:
utf8-bom
<encoder>
drop
B{
239 187 191
}
over
stream-write
utf8
<encoder>
;
USING:
accessors
io.encodings
io.encodings.utf8
kernel
;
M::
utf8-bom
decode-char
( stream encoding -- char/f )
stream
utf8
decode-char
encoding
bom?>>
[
t
encoding
bom?<<
dup
65279
=
[
drop
stream
utf8
decode-char
]
when
]
unless
;