R error "Invalid encoding UTF-8: defaulting to UTF-8."
Message “Invalid encoding UTF-8: defaulting to UTF-8.” is apparently thrown by https://github.com/r-lib/httr/blob/master/R/content-parse.r\#L (credit to Marcin at https://stackoverflow.com/questions/44143931/iconvlist-inconsistency-on-alpine-linux)
I confirm that in R 3.5.0 calling iconvlist() returns:
[1] “…” “ISO8859-1,” “ISO8859-2,” “ISO8859-3,” “ISO8859-4,”
[6] “ISO8859-5,” “ISO8859-6,” “ISO8859-7,” “UCS-2BE,” “UCS-2LE,”
[11] “US_ASCII,” “UTF-16BE,” “UTF-16LE,” “UTF-32BE,” “UTF-8,”
[16] “UTF32-LE,” “WCHAR_T,”
And Alpine Linux 3.7.0 calling /usr/bin/iconv -l returns:
UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF32-LE, UCS-2BE, UCS-2LE,
WCHAR_T,
US_ASCII, ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5,
ISO8859-6, ISO8859-7, …
This problem does not manifest when running R on CentOS 7.
(from redmine: issue id 8918, created on 2018-05-18)