terminalUTF8Locale returns a widely available UTF-8 character locale for the host OS.
()
| 49 | |
| 50 | // terminalUTF8Locale returns a widely available UTF-8 character locale for the host OS. |
| 51 | func terminalUTF8Locale() string { |
| 52 | if runtime.GOOS == "darwin" { |
| 53 | return "UTF-8" |
| 54 | } |
| 55 | return "C.UTF-8" |
| 56 | } |
| 57 | |
| 58 | // effectiveLocaleIsUTF8 reports whether the locale precedence chain resolves to UTF-8. |
| 59 | func effectiveLocaleIsUTF8(env []string) bool { |