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

Not using package encoding on -package.Rd file #1690

Open
llrs opened this issue Dec 21, 2024 · 0 comments
Open

Not using package encoding on -package.Rd file #1690

llrs opened this issue Dec 21, 2024 · 0 comments

Comments

@llrs
Copy link

llrs commented Dec 21, 2024

Roxygen2 doesn't seem to use the Encoding set on DESCRIPTION for the -package.Rd file.
See the example package: "encodingRoxygen2Error".
Once cloned locally it can be checked with the following code (with R-devel):

rd <- tools::Rd_db(dir = "encodingRoxygen2Error")
rdc <- lapply(rd, tools::checkRd)
rdc[lengths(rdc)> 0]
$`encodingRoxygen2Error-package.Rd`
checkRd: (-1) encodingRoxygen2Error-package.Rd:12: Non-ASCII contents without declared encoding:
  ': Lluís Revilla Sancho'

The fix is simple, add use #' @encoding UTF-8 while documenting "_PACKAGE". But on Rstudio the tooltip when using @encoding says that the usage of encoding is discouraged.
Related, I couldn't find the documentation for the @encoding tag on the documentation.

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