Skip to content

Commit f8114db

Browse files
committed
tests: fix iconv() source encoding
Since iconv() ignores the encoding bits, we must provide the correct from=... argument. The default from="" would only work with a UTF-8 locale. Instead, assume that "\uXX" strings are UTF-8-encoded.
1 parent 7b75771 commit f8114db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inst/tests/tests.Rraw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21115,5 +21115,5 @@ DF = structure(list(a = 1:2), class = c("data.frame", "no.reset"), row.names = c
2111521115
test(2310.01, as.data.table(DF), data.table(a=1:2))
2111621116

2111721117
# avoid translateChar*() in OpenMP threads, #6883
21118-
DF = list(rep(iconv(strrep("\uf8", 100), to = "latin1"), 100000))
21118+
DF = list(rep(iconv(strrep("\uf8", 100), from = "UTF-8", to = "latin1"), 100000))
2111921119
test(2311, fwrite(DF, nullfile(), encoding = "UTF-8"), NULL)

0 commit comments

Comments
 (0)