Handbook
Glossary
begin-utf8 ( stream byte -- stream char )
Vocabulary
io
.
encodings
.
utf8
.
private
Inputs
stream
an
object
byte
an
object
Outputs
stream
an
object
char
an
object
Definition
USING:
combinators
io.encodings
kernel
math
;
IN:
io.encodings.utf8.private
:
begin-utf8
( stream byte -- stream char )
dup
127
>
[
{
{
[
dup
-5
shift
6
=
]
[
double
]
}
{
[
dup
-4
shift
14
=
]
[
triple
]
}
{
[
dup
-3
shift
30
=
]
[
quadruple
]
}
[
drop
replacement-char
]
}
cond
]
when
;
inline