I think i have blogged about the UTF-8 troubles before (zsh not supporting utf8, working with multiple charsets). A new idea sprung into my mind i’d like to discuss: Allowing applications to switch the charset for xterm. Gnome-terminal for example allows you to switch charsets easily (using the menubar, unfortunately not by using profiles).

Why shouldn’t the application trigger this charset switch?

I’m thinking along the lines for switching the window title in xterm. Why not introduce a new “ansi-like” escape sequence that switches the charset?

I am aware that this has some problems such as applications not restoring the character set when terminated. Still being able to “echo \e]charset=iso8859-1;” or so would be cool and would allow me to customize the charset easily for different hosts i ssh onto. Restoring the charset would then be a task of your shell (for example included in the “reset” command)

But i’m way too little an expert of such things. I don’t know what options of variable-passing over ssh one has that could be used to solve this more gracefully…