Attempt 2 at enabling UTF8 by default on new WT
This commit is contained in:
parent
f05eccf270
commit
62946ab52f
|
@ -1,5 +1,15 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// DisableUTF8 set to true will cause cordless to replace characters with a
|
||||
// codepoint higher than 65536 or a runewidth of more than one character.
|
||||
var DisableUTF8 = true
|
||||
var DisableUTF8 bool
|
||||
|
||||
func init() {
|
||||
wtSessionValue, avail := os.LookupEnv("WT_SESSION")
|
||||
DisableUTF8 = !avail || strings.TrimSpace(wtSessionValue) == ""
|
||||
}
|
||||
|
|
|
@ -2,14 +2,10 @@ package main
|
|||
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/Bios-Marcel/cordless/config"
|
||||
)
|
||||
|
||||
func init() {
|
||||
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")
|
||||
flag.BoolVar(&config.DisableUTF8, "disable-UTF8", config.DisableUTF8, "Replaces certain characters with question marks in order to avoid broken rendering")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue