Fix launching of pager so text is interpreted as UTF-8 by default.

This fixes issue https://github.com/sharkdp/bat/issues/98
This commit is contained in:
Gert Hulselmans 2018-05-22 18:38:59 +02:00 committed by David Peter
parent 5ee8913538
commit 33bbf25468
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ impl OutputType {
}
Command::new("less")
.args(&args)
.env("LESSCHARSET", "UTF-8")
.stdin(Stdio::piped())
.spawn()
.map(OutputType::Pager)