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

Encoding fixes #243

Merged
merged 16 commits into from
Jun 22, 2022
Merged

Encoding fixes #243

merged 16 commits into from
Jun 22, 2022

Conversation

JanMarvin
Copy link
Owner

On non unicode systems, encoded strings must be passed through Rcpp::String to avoid broken encoding. On unicode systems there is no issue.

Our previous attempt was not sufficient, this should be fixed now and the code now also a bit cleaner. Previously we checked our R locale and passed that along.

Obviously handling non unicode encoding is a major pita, but non unicode R and OSes will likely be around for a long time. We should also add some non unicode CI.

@JanMarvin JanMarvin added the encoding 🔠 Encoding while reading or writing is disturbed label Jun 21, 2022
@JanMarvin
Copy link
Owner Author

The failing R 4.1 check complicates things a bit to much 😆 I'm not aware if it should work in whatever windows locale is selected. Maybe it works fine, because these characters are not available in the default "C" locale?

@JanMarvin
Copy link
Owner Author

hmmm, that does not work as expected :(

@JanMarvin
Copy link
Owner Author

Could you please have a look @jmbarbone ? Obviously I'm missing something here. It works as intended (that much I was able to confirm with a German locale R 4.2), I'm just unable to make the test work.

@JanMarvin JanMarvin linked an issue Jun 21, 2022 that may be closed by this pull request
@JanMarvin
Copy link
Owner Author

Okay, the remaining error either seems to have nothing to do with us (something in testthats mclapply), or at least it only occurs in x32-R. I can live with that. Might poke it a few more times tomorrow, but if it cannot be fixed, I wont hesitate merging this either way and disable the oldrel Windows-CI. Somehow doubt that anybody was working on 32-bit R on Windows in the last decade.

I will not investigate the build error until I have to.
@JanMarvin JanMarvin merged commit 13beedf into main Jun 22, 2022
@JanMarvin JanMarvin deleted the vec_string branch June 22, 2022 06:33
@JanMarvin
Copy link
Owner Author

After a restful sleep, I realized that I don't want to invest any more time in this problem and that it won't be an obstacle to the encoding PR I care about. We may need to investigate this once we roll out to CRAN. We may have to disable some testing on Windows. But right now there is a lot more to do and multiarch builds on Windows are something I am not that interested in.

@jmbarbone
Copy link
Collaborator

Noting that #244 is related to the test failures from this PR

@JanMarvin
Copy link
Owner Author

Thanks, still strange though. The x64 tests finished and locally I didn't recall issues either. There isn't anything I would suspect in this pull request either.

@JanMarvin
Copy link
Owner Author

Wasted another 2-3 hours on this, but to no avail. I dislike Windows for a reason and R on Windows makes no exception :)

What I tried:

  • disable the newly introduced tests
  • test in 32 bit and 64 bit
  • test with R 4.1.0 and R 4.1.2
  • test with devtools::check() in the R console (this creates strange warnings regarding exit, abort, and printf
  • couldn't make R CMD check work in the CMD 😭
  • created Makevars.in, Makevars.win and Makevars.urct

What I will try next:

  • forget that the issue exists

@jmbarbone
Copy link
Collaborator

I tried playing around with a few things but couldn't get any error to pop up. Maybe not as comprehensive as you've checked.

forget that the issue exists

So backlog then? We can wait until it pops up again.

@JanMarvin
Copy link
Owner Author

Not the ideal way to proceed, but I have no other idea. At least it works with x64 and on R 4.2+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoding 🔠 Encoding while reading or writing is disturbed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iconv error with €
2 participants