UTF8 should now be enabled by default in the new windows terminal
@@ -2,9 +2,14 @@ package main
import (
"flag"
+ "os"
+ "strings"
+
"github.com/Bios-Marcel/cordless/config"
)
func init() {
- flag.BoolVar(&config.DisableUTF8, "disable-UTF8", true, "Replaces certain characters with question marks in order to avoid broken rendering")
+ wtSessionValue, avail := os.LookupEnv("WT_SESSION")
+ disableUTF8Default = !avail || strings.TrimSpace(wtSessionValue) == ""
+ flag.BoolVar(&config.DisableUTF8, "disable-UTF8", disableUTF8Default, "Replaces certain characters with question marks in order to avoid broken rendering")
}
