When running on Windows, the default end-of-line style in flexi-streams, which is specified by flexi-streams::*default-eol-style*, is :CRLF (in<flexi-streams>/specials.lisp). That means all calls to flexi-streams functions which do not specified the end-of-lien style are using :CRLF , which is wrong for cl-html5-parser.
Best solution is to use external formats with the end-of-line specified explicitly. For example, replace :utf-16le by '(:utf-16le :eol-style :lf). In cases when currently it doesn't pass external-format, it should pass '(Latin-1 :eol-style :lf).