summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver/controlhttpserver.go
diff options
context:
space:
mode:
authorSimon Law <sfllaw@tailscale.com>2026-01-07 18:12:06 -0800
committerGitHub <noreply@github.com>2026-01-07 18:12:06 -0800
commit522a6e385ef2624ff3a976ee29594cb2a2669eda (patch)
tree064ce1b00717c1788901644aea4b4dd156252c07 /control/controlhttp/controlhttpserver/controlhttpserver.go
parente66531041b7d8f6c22a654d5b6e0aabe3e914b92 (diff)
downloadtailscale-522a6e385ef2624ff3a976ee29594cb2a2669eda.tar.xz
tailscale-522a6e385ef2624ff3a976ee29594cb2a2669eda.zip
cmd/tailscale/cli, util/qrcodes: format QR codes on Linux consoles (#18182)
Raw Linux consoles support UTF-8, but we cannot assume that all UTF-8 characters are available. The default Fixed and Terminus fonts don’t contain half-block characters (`▀` and `▄`), but do contain the full-block character (`█`). Sometimes, Linux doesn’t have a framebuffer, so it falls back to VGA. When this happens, the full-block character could be anywhere in extended ASCII block, because we don’t know which code page is active. This PR introduces `--qr-format=auto` which tries to heuristically detect when Tailscale is printing to a raw Linux console, whether UTF-8 is enabled, and which block characters have been mapped in the console font. If Unicode characters are unavailable, the new `--qr-format=ascii` formatter uses `#` characters instead of full-block characters. Fixes #12935 Signed-off-by: Simon Law <sfllaw@tailscale.com>
Diffstat (limited to 'control/controlhttp/controlhttpserver/controlhttpserver.go')
0 files changed, 0 insertions, 0 deletions