-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid UTF-8 output on Windows.
Currently, Rust's standard library will yield an error if one tries to write invalid UTF-8 to a Windows console. This is problematic for ripgrep when it tries to print matched lines that contain invalid UTF-8. We work around this by modifying the `termcolor` library to lossily decode UTF-8 before sending it to `std::io::Stdout`. This may result in some Unicode replacement chars being shown in the output, but this is strictly better than erroring or not showing anything at all. Fixes #318.
- Loading branch information
1 parent
a7ca2d6
commit ed60ec7
Showing
1 changed file
with
114 additions
and
13 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