Well, the same argument could be applied to the UTF-16 decoder know that the string came from the start of a file, and not from slicing some already loaded file? The standard states that:
In the UTF-16 encoding scheme, U+FEFF at the very beginning of a file
or stream explicitly signals the byte order.
So it is perfectly permissible to perform this type of processing if you consider a string to be equivalent to a stream.—Evan