Prompt Issues Only in Xorg reddit / BSD ---------------------------------------------------------------------- [deleted] · 2018-11-06 01:20 [deleted] ---------------------------------------------------------------------- Kernigh · 2018-11-06 02:34 You might be using the wrong character encoding, like ISO-8859-1 versus UTF-8. I didn't see your zshrc, and I don't know how your prompt should look, so I don't know whether your zshrc needs a different encoding. Try changing your terminal's encoding. In xfce4-terminal, you can use Terminal → Set Encoding. After you change the encoding, you must print another prompt to see if looks different. If you find a working encoding, you should change your locale, because many programs default to the locale's encoding. [locale(1)](https://www.freebsd.org/cgi/man.cgi?query=locale) (in both BSD and GNU/Linux) shows your LC\_CTYPE. The part after the dot is the encoding. My OpenBSD machine shows `LC_CTYPE=en_US.UTF-8`, so my encoding is UTF-8. If there's no dot in LC\_CTYPE, the encoding might be ASCII. `locale -a` shows a list of locales, and `export LC_CTYPE=en_US.UTF-8` in a shell changes the locale (see [environ(7)](https://www.freebsd.org/cgi/man.cgi?query=environ)), but only for programs launched from that shell. ---------------------------------------------------------------------- [deleted] · 2018-11-06 02:39 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 02:41 [deleted] ---------------------------------------------------------------------- Kernigh · 2018-11-06 02:55 I see a literal ââââ and âââ on lines 254 and 255. I wonder if the zshrc got converted to or opened in the wrong encoding? Does that part of the file look different if you view it in the tty outside Xorg? ---------------------------------------------------------------------- _king3vbo · 2018-11-06 02:58 PROMPT=' %B%F{red}ââââ=${user_host_jobs}[ %F{white}%~%F{red} ]$(git_prompt_info) âââ(%b%f ' Therein lies your issue ---------------------------------------------------------------------- [deleted] · 2018-11-06 03:01 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 03:03 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 03:05 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 03:05 [deleted] ---------------------------------------------------------------------- _king3vbo · 2018-11-06 03:15 Then it's probably your system's character encoding like /u/Kernigh said ---------------------------------------------------------------------- [deleted] · 2018-11-06 03:24 [deleted] ---------------------------------------------------------------------- Kernigh · 2018-11-06 03:37 You need these 3 characters: * ┌ is U+250C box drowings light down and right * ─ is U+2500 box drawings light horizontal * └ is U+2514 box drawings light up and right These exist in cp437, cp850, utf-8, but not in iso-8859-1 nor windows-1252. By my guess, your zshrc is in utf-8, but the programs in Xorg misread it as iso-8559-1, where * ┌ would be misread as â\\x94\\x8c * ─ would be misread as â\\x94\\x80 * └ would be misread as â\\x94\\x94 \\x80, \\x8c, \\x94 are invisible control characters, so all 3 characters look like â. I suggest to keep the zshrc in utf-8, and to change the locale to utf-8. Then terminals and other programs, if they use the locale's encoding, will use utf-8. ---------------------------------------------------------------------- [deleted] · 2018-11-06 03:46 [deleted] ---------------------------------------------------------------------- WalkingOnFire · 2018-11-06 10:06 You don't need sudo to change a global variable in a shell. export is a buit-in shell command and probably is giving you an error if you use sudo. ---------------------------------------------------------------------- FUZxxl · 2018-11-06 11:03 Do not use `sudo` unless you know why. Also do not randomly try to stick `sudo` in front of things if they don't seem to work, this typically just makes the problem worse. In this case, `sudo` actually prevents your attempt to set the locale from working because `sudo` runs its argument in a separate shell. ---------------------------------------------------------------------- [deleted] · 2018-11-06 14:58 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 15:23 [deleted] ---------------------------------------------------------------------- FUZxxl · 2018-11-06 16:50 Then it didn't solve your problem. ---------------------------------------------------------------------- [deleted] · 2018-11-06 17:01 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 19:22 [deleted] ---------------------------------------------------------------------- [deleted] · 2018-11-06 19:29 [deleted] ---------------------------------------------------------------------- FUZxxl · 2018-11-06 19:40 Every application has its own settings. `xterm` uses the slightly archaic concept of X11 resources which allow you to set up Unicode support for terminal windows. Other terminal emulators might fare differently. Typically, you want to set up the locale before you start an X server so all programs start with the right locale set up. This can be done in different ways depending on how you start the X server. ---------------------------------------------------------------------- [deleted] · 2018-11-06 19:43 [deleted] ---------------------------------------------------------------------- WalkingOnFire · 2018-11-06 20:05 https://cooltrainer.org/a-freebsd-desktop-howto/#utf-8 ---------------------------------------------------------------------- [deleted] · 2018-11-06 20:16 [deleted]