commit 9580f50ebb21722baeea8cfb55bb8a7c5ec64c41
parent 7e308a14272a221cd9bd0d3dba7618b4f349e8de
Author: Chris Bracken <chris@bracken.jp>
Date: Fri, 10 May 2024 10:15:13 -0700
lynx: default to UTF-8, fix LYNX_CFG env var
The HTTP 1.1 RFC [1] section 3.7.1 says that the default charset is
assumed to be ISO-8859-1:
When no explicit charset parameter is provided by the sender, media
subtypes of the "text" type are defined to have a default charset
value of "ISO-8859-1" when received via HTTP.
On the modern web and gopher sites though, UTF-8 is a far more
reasonable default, so we set that.
I would have assumed that ASSUME_CHARSET was the correct config value
here, based on the documentation [2], but that doesn't appear to work.
On the command-line, the equivalent flag appears to be
`--display_charset=utf-8`.
[1]: https://www.rfc-editor.org/rfc/rfc2616
[2]: https://lynx.invisible-island.net/lynx_help/body.html
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.config/lynx/lynx.cfg b/.config/lynx/lynx.cfg
@@ -0,0 +1 @@
+CHARACTER_SET:utf-8
diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv
@@ -50,7 +50,7 @@ export GNUPGHOME="$HOME/.gnupg"
export GPG_TTY="$(tty)"
# Lynx browser.
-export LYNX_CFG_PATH="$XDG_CONFIG_HOME/lynx/lynx.cfg"
+export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg"
# Notmuch email indexer.
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config"