You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parse()ing the text from Authors@R does not work if that field contains non-ASCII characters and the DESCRIPTION file is not in the native encoding of the system processing the package (UTF-8). Typical examples are "latin1" packages with accented characters in author names, e.g.:
res <- process_package("https://cran.r-project.org/src/contrib/flexrsurv_1.4.1.tar.gz", "flexrsurv", "cran")
Proper handling of package descriptions is provided by the desc package. However, a simple fix to just support packages in latin1 encoding in addition to UTF-8 is to mark the Encoding() in get_description() as in utils:::.read_description():
Conversion to the native encoding ensures that the subsequent parsing and evaluation of the Authors@R field works on the system which runs the code. I think that's the way to go!
r-package-parser/R/processing.R
Line 36 in cb48a03
parse()
ing the text from Authors@R does not work if that field contains non-ASCII characters and the DESCRIPTION file is not in the native encoding of the system processing the package (UTF-8). Typical examples are "latin1" packages with accented characters in author names, e.g.:Proper handling of package descriptions is provided by the desc package. However, a simple fix to just support packages in latin1 encoding in addition to UTF-8 is to mark the
Encoding()
inget_description()
as inutils:::.read_description()
:This might fix datacamp/rdocumentation-app#386.
The text was updated successfully, but these errors were encountered: