Last active
January 19, 2021 08:14
-
-
Save ThierryO/0eb85ba25eb52698e6b25e7c40fac557 to your computer and use it in GitHub Desktop.
test locale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x <- c( | |
"a", "A", "0", "9", "z", "Z", "\U20AC UTF-8", | |
"\U00E9", "&", "\U00E0", "\U00B5", "\U00E7", "€ plain", "|", "#", "@", "$" | |
) | |
message("raw input") | |
print(x) | |
x <- enc2utf8(x) | |
message("input encoded as UTF-8") | |
print(x) | |
Sys.setlocale(locale = "C") | |
message("sorted input in C locale") | |
print(sort(x)) | |
message("order in C locale") | |
print(order(x)) | |
print(sessionInfo()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment