-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework filepath (re-)encoding (#438)
* Revert filepath reencoding * Unskip this test * Re-encode to native just prior to fopen() or mio::make_mmap_source() * Expose the bytes * Unconditionally encode paths as UTF-8 * Clean up comments, remove print debugging * Ensure path returned by `chr_to_file()` is encoded as UTF-8 This guards against the scenario where the tempdir's path has non-ascii characters in it. Presumably that could arise on, say, Windows if the user name has non-ascii characters: > tempdir() [1] "C:\\Users\\jenny\\AppData\\Local\\Temp\\Rtmpg30qBQ" * Add more `enc2utf8()` Everytime we use a base R path-handling function, explicitly re-encode the result as UTF-8. * Inline the reference object * Test writing to a non-ascii path * Test read/write of .zip with non-ascii characters in path * Rewrite this test * I now think the problem IS in archive, for Windows and unix Skip this test in non-UTF-8 locales for now * Add a test re: reading fwf from non-ascii filepath * Tweaks NEWS * Make versions of basename() and normalizePath() that uphold UTF-8 everywhere
- Loading branch information
Showing
4 changed files
with
104 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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