Repository navigation
fix windows test for R 4.2.0 - #1090
Merged
Merged
Conversation
This was referenced Apr 25, 2022
Merged
| msg <- "Invalid multibyte character in parser. Is the encoding correct?" | ||
| if (.Platform$OS.type == "windows") { | ||
| # Windows parser throws a different error message because the source code is converted to native encoding | ||
| if (.Platform$OS.type == "windows" && getRversion() < "4.2.0") { |
Collaborator
There was a problem hiding this comment.
maybe we can just use l10n_info()? would rather test for capabilities than system properties
also worth giving a quick check on the rest of the codebase for similar tests...
Collaborator
Author
There was a problem hiding this comment.
How would this test go with l10n_info() I don't have 4.2.0 on windows at the moment.
Collaborator
Author
There was a problem hiding this comment.
Is if (!l10n_info()[["UTF-8"]]) { ... } correct? I just installed R 4.2.0 to see what windows UCRT reports:
> l10n_info()
$MBCS
[1] TRUE
$`UTF-8`
[1] TRUE
$`Latin-1`
[1] FALSE
$codepage
[1] 65001
$system.codepage
[1] 65001
4.1.2 reports
> l10n_info()
$MBCS
[1] FALSE
$`UTF-8`
[1] FALSE
$`Latin-1`
[1] TRUE
$codepage
[1] 1252
$system.codepage
[1] 1252
Collaborator
There was a problem hiding this comment.
that looks right to me
Collaborator
There was a problem hiding this comment.
better to use isTRUE() as I'm not 100% sure that element is always there?
MichaelChirico
approved these changes
Apr 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.