kenorb-contrib / tg

`telegram-cli` for Telegram IM
https://github.com/telegramdesktop/tdesktop
GNU General Public License v2.0
386 stars 53 forks source link

Weird characters in CLI output #21

Open bytes-commerce opened 4 years ago

bytes-commerce commented 4 years ago

I am seeing these characters in the CLI output. Any idea whats causing them and how I could get rid of them? I am using the latest build of this repository and just built the program.

image

Paulchen232 commented 4 years ago

In the terminal: (Raspberry Pi) locale LANG=de_DE.UTF-8 LANGUAGE= LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL=

bytes-commerce commented 4 years ago

My locale:

LANG=de_DE.UTF-8 LANGUAGE=de_DE LC_CTYPE=de_DE.UTF-8 LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL=

Paulchen232 commented 4 years ago

I think LANGUAGE is false. Try sudo update-locale LANG=de_DE.UTF-8 and reboot or restart terminal. Look if locale and Telegram-CLI is better.

bytes-commerce commented 4 years ago

This hasn't changed the LANGUAGE key for me. Checked on a ZSH console for what its worth it.

Paulchen232 commented 4 years ago

Ok, make cat /etc/default/locale and look what there in.

bytes-commerce commented 4 years ago

Sure:

#  File generated by update-locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE
Paulchen232 commented 4 years ago

Ok, delete LANGUAGE=de_DE with sudo nano /etc/default/locale

bytes-commerce commented 4 years ago

Done, restarted Terminal, same output.

However, if I switch over to TTY1 and try to do it, it works. But thats a Bash console over there and in Terminator I have ZSH: zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

Paulchen232 commented 4 years ago

same output.

You mean Telegram-CLI?

bytes-commerce commented 4 years ago

Yes, sorry for not being clear. telegram-cli in ZSH console still has the weird characters. I can switch over to Bash terminal where it runs fine in the same instance of machine.

Paulchen232 commented 4 years ago

Look there on Point 6.

Screenshot_20200609-050617(1)

N8Deathrider commented 3 years ago

I'm seeing some odd characters aswell, after converting them to their Unicode values it appears, in front of channel names are two characters

  1.  which is apparently Unicode character (U+001) or its ISO name "\<Start of Heading> (SOH)" Link with more info on the character
  2.  which is apparently Unicode character (U+002) or its ISO name "\<Start of Text> (STX)" Link with more info on the character These characters appear before and after a channel name in the pattern (1)(2)ChannelName(1)(2)

    Here is an example: Channel BadDadJokes: 387 unread And sometimes (notably around contacts names where they both appear doubled before and after the name) they appear more around different parts of the line.

Any ideas?

I've messed around a little and it doesn't appear to be a font or a language issue or something that's causing those characters to be printed. I'd look through the code myself further but, I don't understand the code or how it's structured and I am also still learning C