#+TITLE: OpenBSD Weechat Question Mark Message Separator Fix #+DATE: 2024-02-23T19:46:49-05:00 #+DRAFT: false #+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!