diff --git a/core/io/encodings/utf16/utf16.factor b/core/io/encodings/utf16/utf16.factor index d8da3af766..e844ff2afe 100644 --- a/core/io/encodings/utf16/utf16.factor +++ b/core/io/encodings/utf16/utf16.factor @@ -160,7 +160,8 @@ M: utf16 ( stream utf16 -- decoder ) M: utf16 ( stream utf16 -- encoder ) drop bom-le over stream-write utf16le ; +: le? ( -- ? ) B{ 1 0 0 0 } 0 alien-unsigned-4 1 = ; foldable + PRIVATE> -: utf16n ( -- value ) - B{ 1 0 0 0 } 0 alien-unsigned-4 1 = utf16le utf16be ? ; foldable +: utf16n ( -- value ) le? utf16le utf16be ? ;