stri_enc_isutf16be(str)stri_enc_isutf16le(str)
stri_enc_isutf32be(str)
stri_enc_isutf32le(str)
raw vectorsNegative answer means that a string is surely not in valid UTF-16 or UTF-32. Positive result does not mean that we should be absolutely sure.
Also, note that sometimes a data stream may be classified as both valid UTF-16LE and UTF-16BE.
stri_enc_detect2;
stri_enc_detect;
stri_enc_isascii;
stri_enc_isutf8;
stringi-encoding