Version: (using KDE KDE 3.5.3) Compiler: gcc 4.0.2 OS: Linux Please support escape sequence for querying the encoding of the current tab, and escape sequence for setting encoding of the current tab. Note that this does not affect locale of konsole, only the encoding in the current tab. Setting and querying global locale of the konsole would be another pair of escape-sequences, unrealted to the sequences for querying and setting the encoding of a single tab. For comparison, urxvt does not have sequences for querying and changing encoding of current tab. But that because urxvt does not have different encodings for its tab (which is an omission on part of urxvt which is advantage of konsole). Urxvt have different feature -- the sequence for querying and setting global locale of urxvt [1]. But this feature is different from requested feature because it affects all tabs. [1] urxvt reference [2] describes sequence for querying and setting locale of urxvt, this affects all tabs and is different from the requested feature. "ESC ] Ps;Pt ST" Ps = 701 Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills). # change the locale and tell rxvt-unicode about it export LC_CTYPE=ja_JP.EUC-JP; printf "\33]701;$LC_CTYPE\007" [2] 'man 7 urxvt' or http://www.penguin-soft.com/penguin/man/7/urxvt.html
Wish, right?
Confirmed following discussion on mailing list.
In the KDE4 konsole, the konsoleprofile utility can be used to change the encoding of current tab, for example: $ konsoleprofile DefaultEncoding=GBK
Or, use the related dbus methods : $ qdbus org.kde.org konsole /Sessions/1 codec UTF-8 $ qdbus org.kde.org konsole /Sessions/1 setCodec GBK true You can get the needed dbus parameters corresponding to current tab by looking at environment variable $KONSOLE_DBUS_SERVICE and $KONSOLE_DBUS_SESSION.
I think the dbus methods in comment #4 are good enough. Feel free to reopen if you think they are not good enough to satisfy your need.