Closed zaoqi closed 6 years ago
Termux不使用区域设置。 可以在 https://termuxarch.github.io/TermuxArch/ 找到locales。
Termux is currently an english-only environment. This is to decrease the overhead in maintaining locale support.
Is this related?
#!/usr/bin/env Rscript
library(readr)
main <- function(argv) {
teams <- readr::read_csv("team_standings.csv", col_types = "ic",
locale = locale(tz = "Asia/Kolkata"))
print(teams)
return(0)
}
if (identical(environment(), globalenv())) {
quit(status = main(commandArgs(trailingOnly = TRUE)))
}
Csv file:
"Standing","Team"
1,"Spain"
2,"Netherlands"
3,"Germany"
4,"Uruguay"
5,"Argentina"
6,"Brazil"
7,"Ghana"
8,"Paraguay"
9,"Japan"
10,"Chile"
11,"Portugal"
12,"USA"
13,"England"
14,"Mexico"
15,"South Korea"
16,"Slovakia"
17,"Ivory Coast"
18,"Slovenia"
19,"Switzerland"
20,"South Africa"
21,"Australia"
22,"New Zealand"
23,"Serbia"
24,"Denmark"
25,"Greece"
26,"Italy"
27,"Nigeria"
28,"Algeria"
29,"France"
30,"Honduras"
31,"Cameroon"
32,"North Korea"
Error message:
$ ./readteamstandings.R Error: Unknown TZ UTC (when no locale specified) In addition: Warning message: In OlsonNames() : no Olson database found Execution halted