stri_enc_isutf16: Check If a Data Stream Is Possibly in UTF16 or UTF32

Description Usage Arguments Details Value See Also

Description

These functions detect whether a given byte stream is valid UTF-16LE, UTF-16BE, UTF-32LE, or UTF-32BE.

Usage

1
2
3
4
5
6
7

Arguments

str

character vector, a raw vector, or a list of raw vectors

Details

These functions are independent of the way R marks encodings in character strings (see Encoding and stringi-encoding). Anyway, most often, you will provide input data as raw vectors here.

Negative 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.

Value

Returns a logical vector.

See Also

Other encoding_detection: stri_enc_detect2; stri_enc_detect; stri_enc_isascii; stri_enc_isutf8; stringi-encoding


stringi documentation built on May 2, 2019, 4:54 p.m.