Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix/encoding #30
Fix/encoding #30
Conversation
Will ponder but this is probably good as is -- and it is nicely minimal. @kevinushey, can you chime in? (Oh, and now that I showed you |
Codecov Report
@@ Coverage Diff @@
## master #30 +/- ##
=========================================
+ Coverage 60.17% 60.2% +0.02%
=========================================
Files 3 3
Lines 1341 1342 +1
=========================================
+ Hits 807 808 +1
Misses 534 534
Continue to review full report at Codecov.
|
|
LGTM! I think keeping everything as UTF-8 rather than attempting to accommodate different encodings of text is a good idea, unless RcppTOML works with large enough strings that copying / re-encoding of strings could be expensive enough to matter. |
I think it is safe concerning encoding. But I was wondering whether the c++ code I wrote (using additional
The only bad scenario I can imagine would be if user has a text labeled as "unknown" encoding but it would not be his/her system's native encoding. Then
Sure, I will make a commit to the man page changes and enhance the pull request. |
|
Quick follow-up and another Thanks! for the PRs -- new version is now on CRAN. |
|
That's great! I have been pleased to contribute! |
Issue #28.
It looks good and surprisingly easy.
test.txt
I only have two doubts.
Rf_mkCharCE?enc2utf8(input)is too strict. Some R functions for string manipulations haveencodingargument allowing for various other encodings and useiconv(x, from=encoding, to='UTF-8')to convert it. But I ditched this idea since it would not apply to cases wherefromFile=TRUEand that would be very confusing.This pull request is just a kick-off. I will add some documentation before merging after we agree on the right solution.