Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN warnings for Solaris - "it is not known that wchar_t is Unicode on this platform" #156

Closed
PolMine opened this issue Jul 22, 2020 · 2 comments

Comments

@PolMine
Copy link
Collaborator

PolMine commented Jul 22, 2020

On Solaris, check results complain about a Unicode issue, see https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/polmineR-00check.html:

checking for code/documentation mismatches ... WARNING
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
Warning in check_codoc(x, as.pairlist(as.alist.call(y[-1L]))) :
  it is not known that wchar_t is Unicode on this platform
checking Rd \usage sections ... WARNING
Warning in .arg_names_from_call(e[-1L]) :
  it is not known that wchar_t is Unicode on this platform
Warning in .arg_names_from_call(e[-1L]) :
  it is not known that wchar_t is Unicode on this platform
Warning in .arg_names_from_call(e[-1L]) :
  it is not known that wchar_t is Unicode on this platform
Warning in .arg_names_from_call(e[-1L]) :
  it is not known that wchar_t is Unicode on this platform

It is an issue with many packages, see for instance quanted issue #1776. I have great difficulty to reproduce the error. Though I have a Solaris VirtualBox installation of R, I cannot adjust the Encoding to provoke the error. However, there has been a short discussion on the R-pkg-devel mailing list that points to a potential solution (moving Unicode to an external file)

@PolMine
Copy link
Collaborator Author

PolMine commented Jul 22, 2020

Using the following snippet, I tried to detect all non-ASCII/Unicode characters in the package.

files <- list.files("~/Lab/github/polmineR/R", full.names = TRUE)
for (file in files){
  print(file)
  tools::showNonASCIIfile(file)
}

Indeed, I removed anything I detected. There were German names such as "Bärbel Höhn", but for the international audience the package targets, German Umlaute are odd to look at. Checking whether special characters can be processed should be left to unit tests.

There is, howver, another snippet that should also be moved to unit tests that I took out now.

y <- .recode_call(substitute(name == "Müller"), to = "latin1")
dt <- data.table(
   id = 1L:3L,
  name = iconv(x = c("Müller", "Höhn", "Delingöz"), from = "UTF-8", to = "latin1")
)
dt[eval(y, envir = df), on = "name"]

@ablaette
Copy link
Collaborator

CRAN does not check Solaris any more, so I will not invest energy in Solaris issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant