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
NOTE "marked UTF-8 string in data" should be addressed #1663
Comments
Here's how I located the problem. First, I moved all the tools:::.check_package_datasets(".") after every move. This can be done in a bisection sort of way, to avoid having to do it once per each file. I found that the culprit is |
I suspect the problem is that the file from which
but, actually, it could also be in the dashes that are in the file, since they can cause problems sometimes. I will look further into the file, and then I'll fix up the code. |
An aside: I am aware that this is similar to #1211 but I am recording my steps here as well. |
I'm trying to dredge up some memory of dealing with encodings in R (bad memories!) and below is a scent of the trail > l<-readLines("create_data/xbt/xbt.edf",encoding="UTF-8")
> bad<-which(is.na(iconv(l,"UTF-8","UTF-8")))
> l[bad+seq(-1,1)]
[1] "//"
[2] "Depth (m) - Temperature (<U+00B0>C) - Sound Velocity (m/s)"
[3] "4.7 20.91 1575.30"
>
> l<-readLines("create_data/xbt/xbt.edf",encoding="latin1")
> bad<-which(is.na(iconv(l,"UTF-8","UTF-8")))
> l[bad+seq(-1,1)]
[1] "//"
[2] "Depth (m) - Temperature (<b0>C) - Sound Velocity (m/s)"
[3] "4.7 20.91 1575.30"
> |
Oh, I see. The problem is that we are storing the header, and it contains the funny character > xbt <- read.xbt("create_data/xbt/xbt.edf")
> which(is.na(iconv(xbt@metadata$header,"UTF-8","UTF-8")))
[1] 34
> xbt@metadata$header[34]
[1] "Depth (m) - Temperature (<U+00B0>C) - Sound Velocity (m/s)"
> |
This is done now in "develop" commit ff03b72 |
Although I had clean checks prior to CRAN submission, I am seeing at
https://cran.r-project.org/web/checks/check_results_oce.html
that some machines running the R-devel version are producing
so I want to fix that up.
The text was updated successfully, but these errors were encountered: