mountainMath / cancensus

R wrapper for calling CensusMapper APIs

Home Page:https://mountainmath.github.io/cancensus/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CRAN NOTE for marked utf-8 strings

dshkol opened this issue · comments

https://cran.r-project.org/web/checks/check_results_cancensus.html

Version: 0.4.0
Check: data for non-ASCII characters
Result: NOTE
     Note: found 23 marked UTF-8 strings
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-macos-x86_64, r-oldrel-macos-x86_64

I can try and re-encode the data to see if it goes away. Hard to fix because none of our checks pick it up.

I’ll try something along these lines: data for non-ASCII characters

I've found the offending data, it's in CODE_TABLE, as expected.

length(grep("NOT_ASCII", iconv(CODES_TABLE$status_code, "UTF-8", "ASCII", sub="NOT_ASCII"))) + length(grep("NOT_ASCII", iconv(CODES_TABLE$status, "UTF-8", "ASCII", sub="NOT_ASCII")))
[1] 23

I saw a thread on r-dev that suggests if the non-ascii chars are intentional we should just comment in our cran notes as such, but might have issues for portability.

Hard to believe that there is no way to include non-ascii characters in a way that works on all R platforms. I say we just go with that route.

Will leave as such with an explicit note in cran comments that this is intentioal.