summaryrefslogtreecommitdiffstats
path: root/content/posts/openbsd-weechat-separator-fix/index.org
diff options
context:
space:
mode:
authorDante Catalfamo2024-02-26 14:35:18 -0500
committerDante Catalfamo2024-02-26 14:35:18 -0500
commit74798b008463c65bc53ef35630e3701abee5d938 (patch)
tree2be148a5e7f2b9f644abebd1edf958ae654395cc /content/posts/openbsd-weechat-separator-fix/index.org
parent8c8a9b690564a26c29ab7e3fa4565cb0c0e28a83 (diff)
downloadblog-74798b008463c65bc53ef35630e3701abee5d938.tar.gz
blog-74798b008463c65bc53ef35630e3701abee5d938.tar.bz2
blog-74798b008463c65bc53ef35630e3701abee5d938.zip
Add openbsd-weechat-fix
Diffstat (limited to 'content/posts/openbsd-weechat-separator-fix/index.org')
-rw-r--r--content/posts/openbsd-weechat-separator-fix/index.org53
1 files changed, 53 insertions, 0 deletions
diff --git a/content/posts/openbsd-weechat-separator-fix/index.org b/content/posts/openbsd-weechat-separator-fix/index.org
new file mode 100644
index 0000000..45d6029
--- /dev/null
+++ b/content/posts/openbsd-weechat-separator-fix/index.org
@@ -0,0 +1,53 @@
+#+TITLE: OpenBSD Weechat Question Mark Message Separator Fix
+#+DATE: 2024-02-23T19:46:49-05:00
+#+DRAFT: true
+#+DESCRIPTION: Fix the weechat message separator character being replaced by a question mark on OpenBSD
+#+TAGS[]: weechat openbsd
+#+KEYWORDS[]: weechat openbsd
+#+SLUG:
+#+SUMMARY:
+
+#+ATTR_HTML: :title OpenBSD weechat separator fix
+#+ATTR_HTML: :alt OpenBSD weechat separator changing from a question mark to a pipe character
+[[file:cover.png]]
+
+
+I just solved what was becoming a very aggravating issue thanks to the
+help from the folks in the =#weechat= channel in Libera.Chat.
+
+On OpenBSD, my =weechat= client would put a question mark to separate
+the nicks and the messages sent with a question mark instead of a
+pipe-looking character like it should.
+
+It looks like this was caused by opening =weechat= without having the
+correct locale set. By default, OpenBSD uses a locale of =C=, which
+only supports =ASCII= characters. According to the [[https://www.openbsd.org/faq/faq10.html#locales][FAQ]] however, you
+should be able to set your locale to =en_US.UTF-8= to get unicode
+support when available.
+
+The confusing thing was that after correctly setting the locale to
+UTF-8 by adding the following line to my =~/.profile=, it was still broken.
+
+#+begin_src sh
+export LC_ALL=en_US.UTF-8
+#+end_src
+
+It looks like the reason was that =weechat= had saved
+=weechat.look.prefix_suffix= as =?= after opening in a locale that
+doesn't support the character it wanted to use. The fix was to run
+=/unset weechat.look.prefix_suffix= after setting the correct locale.
+
+I also plan on keeping =weechat= open in a =tmux= buffer, so I need to
+set the =$TERM= environment variable to allow 256 colours.
+
+To do that, I need to set the =$TERM= environment variable to
+=tmux-256color= instead of the default =screen= so that =weechat= can
+use a richer selection of colors when displaying information.
+
+To do that, edited =~/.tmux.conf= and added the following line.
+
+#+begin_src conf
+set -g default-terminal "tmux-256color"
+#+end_src
+
+Now everything looks as it should and we're ready to idle!