-
Notifications
You must be signed in to change notification settings - Fork 982
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
tests: Detect session encoding incapable of U+00F1 #6567
Conversation
iconv() does not necessarily fail to convert U+00F1 to ASCII. For example, FreeBSD iconv() succeeds and returns '?' instead of the character in question. Use identical() to compare the result of the conversion back to the original (which internally converts both to UTF-8).
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6567 +/- ##
=======================================
Coverage 98.62% 98.62%
=======================================
Files 79 79
Lines 14450 14450
=======================================
Hits 14251 14251
Misses 199 199 ☔ View full report in Codecov by Sentry. |
Hello, This change fixes test #6559 Thanks |
@@ -18768,7 +18768,7 @@ if (test_bit64) local({ | |||
# non-ASCII plain symbol in by, #4708 | |||
# NB: recall we can't use non-ASCII symbols in the test script. The text is a-<n-tilde>-o (year in Spanish) | |||
native_ano = iconv("a\U00F1o", "UTF-8", "") | |||
if (!is.na(native_ano)) { # #6339: symbol must be represented in native encoding | |||
if (identical(native_ano, "a\U00F1o")) { # #6339: symbol must be represented in native encoding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, thanks. It still leaves us with the else
branch here on FreeBSD where this is unanticipated / the behavior of DT[,.N, by=año]
goes untested there. But let's start with un-breaking the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up is #6573
iconv()
does not necessarily fail to convertU+00F1
to ASCII and returnNA
. For example, FreeBSDiconv()
succeeds and returns?
instead of the character in question. Useidentical()
to compare the result of the conversion back to the original (which internally converts both to UTF-8).Closes: #6339
Should with the part of #6559 that's about encodings, but not OpenMP