From 33bbf254684b3cff3f5af01b77ea83b452c9822b Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Tue, 22 May 2018 18:38:59 +0200 Subject: [PATCH] Fix launching of pager so text is interpreted as UTF-8 by default. This fixes issue https://github.com/sharkdp/bat/issues/98 --- src/output.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/output.rs b/src/output.rs index 4613f62b..4e07a18a 100644 --- a/src/output.rs +++ b/src/output.rs @@ -26,6 +26,7 @@ impl OutputType { } Command::new("less") .args(&args) + .env("LESSCHARSET", "UTF-8") .stdin(Stdio::piped()) .spawn() .map(OutputType::Pager)