Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Window titles not interpreted according to current charset #88

Closed
Jellyfrog opened this issue Aug 20, 2013 · 5 comments
Closed

Window titles not interpreted according to current charset #88

Jellyfrog opened this issue Aug 20, 2013 · 5 comments

Comments

@Jellyfrog
Copy link

Simple test:

echo -ne "\033]0;åäö\007"
Result: åäö
Expected: åäö

TERM=xterm
SHELL=/bin/bash
LANG=en_US.UTF-8
LANGUAGE=en_US:en

PuTTY set to UTF-8
If set inside PuTTY config, it displays correctly.

Found this:

If an escape sequence (e.g. OSC 0) sets the window title bar, the text in the escape >sequence is just sent to the window system for display. We should make sure it is >interpreted according to whatever character set / codepage the terminal emulator is >currently using.

For instance, when charset is set to UTF-8 from PuTTY and locales on the remote >computer are en_US.UTF-8, unicode characters are shown as they vere latin chars.

http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/window-title-charset.html

FauxFaux added a commit that referenced this issue Aug 20, 2013
This is a bit of a hack; I started porting window.c to have a wchar_t
window_title, and getting the terminal to do the conversion before passing
the data through, but this gets messy; quite a bit (including settings and
tray) needs to become wchar_t aware before this can work; it seems almost
acceptable to make the windowing stuff make the decision, based on the
information the terminal has available.
@FauxFaux
Copy link
Owner

That seems to fix it; code's not great; see the commit message.

FauxFaux added a commit that referenced this issue Aug 20, 2013
FauxFaux added a commit that referenced this issue Aug 20, 2013
However, in my tests, various apps I've tested send the title utf-8
encoded /anyway/, regardless of what you ask for with any settings I can
find, and this causes us to return an empty title.  If anyone actually has
a non-utf-8 non-low-ascii setup that they want to report problems with
(the problem being that the title bar just gets truncated), they should
speak up.
@Jellyfrog
Copy link
Author

Cool!
I'll compile tomorrow and try :)

@Jellyfrog
Copy link
Author

Now it works fine! Thanks!

@FauxFaux
Copy link
Owner

Note to self: the commit message in the third commit, "GH-88: Actually use the terminal encoding for the title" is informative: 6fd9b21

@eesau
Copy link

eesau commented Aug 30, 2013

Seems to be broken completely if PuTTY and remote computer are set to ISO-8859-15, window title is blank after login and changing screens or other screen commands won't set the title as they did before. With UTF-8 it is working fine.

FauxFaux added a commit that referenced this issue Nov 30, 2013
To be revisited at a later date.

This reverts commit 1ca64ea.
This reverts commit 445f9f5.
This reverts commit 6fd9b21.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants