powered by
The encoding function returns "ASCII" if the entire value consists of ASCII symbols only, and works identically to Encoding() otherwise. The all_utf8 function is an efficient variant of all(encoding(x) %in% c("ASCII", "UTF-8")).
encoding
"ASCII"
Encoding()
all_utf8
all(encoding(x) %in% c("ASCII", "UTF-8"))
encoding(x)all_utf8(x)
all_utf8(x)
A character vector.
# NOT RUN { encoding("a") encoding("\u00fc") all_utf8(enc2utf8(c("a", "\u00fc"))) # Platform-dependent: all_utf8(enc2native(c("a", "\u00fc"))) # }
Run the code above in your browser using DataLab