I'm currently in a new environemnt, my emacs in terminal displays weird character in files, GUI Emacs works fine. I don't know how to express this, please see the following details:

Text edition:

#include <stdio.h>

int main()
\u2506        printf("hello world\n");
\u2506        return 0;

Image edition: https://i.stack.imgur.com/b5f0p.png

This "\u2506` characters are displayed in all files I've tried, and the files are displayed correctly in other programs such as vim or less.

I believe this is the problem of my new OS, since it works fine in another environment, and I got the same TERM(screen-256color+tmux) and SHELL(fish shell) in both environments.

How can get this fixed? If you need any info, pelase let me know.

  • The u2506 character is a "BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL". Do you have some kind of add-on Emacs package that visualizes tab stops? If so, try to disable it and see if the problem go away (maybe start from emacs -Q.). To fix the issue, we need to 1) check if the terminal can display the character and (if so) 2) figure out why Emacs thinks it can't. – Lindydancer May 16 at 10:40
  • @Lindydancer Yes, it is the result of highlight-indents-guide package. But how can I make my terminals support this? MobaXterm and Mate Terminal don't support it, but Konsole supports it. – CodyChan May 16 at 11:19
  • @Lindydancer And I was wrong, I hardcoded some characters in a file, less and vim don't supprort it either. But I used MobaXterm to access another OS before, it works fine, I believe it is a problem of my new OS, what packages do I need to install? – CodyChan May 16 at 11:23
  • If your terminal can support the character, you can probably tweek the syntax table in Emacs for the character in question. An alternative would be to configure highlight-indent-guides-character to use a more common character that the terminal can handle, like |. – Lindydancer May 16 at 13:43
  • @Lindydancer MobaXterm terminal supports this character in Ubuntu, it just doesn't support this exact character in this speific OS (RHEL7), do I need to install some packages? I just don't know what packages should I install. – CodyChan May 17 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.