Bug 80046 - JJ: possibility to choose the client character encoding, like in gnome-terminal
Summary: JJ: possibility to choose the client character encoding, like in gnome-terminal
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 53933 87655 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-21 08:11 UTC by Clemens Schwaighofer
Modified: 2005-03-04 10:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
setencoding patch for konsole (7.05 KB, patch)
2004-09-05 22:55 UTC, LiuCougar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Schwaighofer 2004-04-21 08:11:58 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Gentoo Packages

In Gnome-Terminal you have the possibilty to change the character encoding for the output in this terminal. This is extremly useful, especially in japanese enviroment where you often have to switch between EUC_JP (unix) SJIS (windows), UTF-8 (perhaps database, etc).
I wish that this kind of feature is added in konsole too. In the "Settings" Dialog, there should be an "Character Encoding" menupoint which lists all encodings like in kwrite or kate.
perhaps have it even configure like in gnome, where you can choose which encodings are listed and which not.
Comment 1 Clemens Schwaighofer 2004-07-15 03:41:54 UTC
Is there any word about this? Perhaps for KDE 3.3 release? or later?
Comment 2 Waldo Bastian 2004-07-15 11:51:11 UTC
Yes, I think the feature is a good idea and shouldn't be too hard. Will not make it into KDE 3.3 I'm afraid.
Comment 3 Clemens Schwaighofer 2004-07-15 14:01:13 UTC
understandable that it won't make in 3.3 as it is already in beta :) But I am really looking forward in later releases. Especially if I can finally ditch that unstable gnome-terminal
Comment 4 Kurt Hindenburg 2004-08-22 08:36:53 UTC
*** Bug 87655 has been marked as a duplicate of this bug. ***
Comment 5 LiuCougar 2004-09-05 22:54:26 UTC
I implemented the basic feature of setEncoding in konsole, please check the patch.

Features:
Set encoding per session
save/retrieve of the encoding for each session

Hope it can be merged into cvs. 

Welcome any comments.
Comment 6 LiuCougar 2004-09-05 22:55:33 UTC
Created attachment 7421 [details]
setencoding patch for konsole

please apply this patch under kdebase/konsole/konsole
Comment 7 Kurt Hindenburg 2004-09-08 02:02:09 UTC
Both konqueror, kwrite and kate have the 'Set Encoding' under 'View'.  Typically it is the last menu entry.
Note that I'm not saying it should be under View, just commenting on other KDE programs.
Comment 8 Kurt Hindenburg 2004-09-09 01:53:21 UTC
*** Bug 53933 has been marked as a duplicate of this bug. ***
Comment 9 LiuCougar 2004-09-17 02:40:50 UTC
Then do you think where this option should be? 
Comment 10 Waldo Bastian 2004-09-17 11:33:56 UTC
It should not be under View IMHO. It would belong under View if it would change the way how the data is represented on the screen (as is the case with kate/konqueror/kmail) but in konsole the encoding determines how new data is processed and may also affect how data is being send to the terminal. As such it belongs under Settings.
Comment 11 Waldo Bastian 2004-09-17 17:21:44 UTC
CVS commit by waba: 

Make it possible to change the encoding (BR80046)
Based on patch by liuspider
CCMAIL: 80046-done@bugs.kde.org


  M +7 -0      TEmulation.cpp   1.57
  M +2 -1      TEmulation.h   1.33
  M +35 -0     konsole.cpp   1.483
  M +3 -0      konsole.h   1.185
  M +3 -0      main.cpp   1.270
  M +11 -0     session.cpp   1.98
  M +3 -1      session.h   1.64



Comment 12 LiuCougar 2004-10-24 21:00:36 UTC
From the original bug report
> ...
> perhaps have it even configure like in gnome, where you can choose which encodings are listed and which not.

I think this is very useful feature: no one on earth can have a knowledge of all the languages out there in the list. In my own case, only 7 encodings (including utf8) is meaningful to me. So IMO this configuration feature should be incorporated into kdelibs itself.

Do you think this is useful? Where this should be implemented? Any comments? 
Comment 13 Clemens Schwaighofer 2004-10-25 01:05:32 UTC
Yeah it would be wonderful to have that in all applications. Would make them way more userfriendly. Right now people get hit by tons of encodings. And if you are not "professional" you have no idea what the difference is in EUC, JIS, SJIS, ...
Comment 14 Kurt Hindenburg 2004-11-22 20:08:09 UTC
I've found that I dislike this.  For some reason, I have 50+ available encodings and when I scroll down the Setting Menu and reach the Encoding menuitem, the popup is the full screen high and 2 columns which covers the entire popdown menu (such that I can no longer scroll down to Keyboard).  Might there be another way to show the Encoding???
Comment 15 Waldo Bastian 2004-11-22 21:57:47 UTC
If there was a KDE wide "my favourite encodings" setting then we could limit the popup menu to those settings, possibly with some sensible defaults based on your country settings or so. We have the same long list in konqueror at the moment. I suggest you propose something like that on kde-core-devel.
Comment 16 Kurt Hindenburg 2005-01-18 18:26:54 UTC
Why isn't the Encoding saved in konsolerc?  
Changing the Encoding to Default prints this:
konsole: Codec Default not found!

I also plan to commit this, which adds the icon next to the menu item:

RCS file: /home/kde/kdebase/konsole/konsole/konsole.cpp,v
retrieving revision 1.498
diff -u -p -r1.498 konsole.cpp
--- konsole.cpp 16 Jan 2005 12:58:21 -0000      1.498
+++ konsole.cpp 18 Jan 2005 17:17:00 -0000
@@ -632,12 +632,11 @@ void Konsole::makeGUI()
       selectFont->plug(m_options);

       // encoding menu, start with default checked !
-      selectSetEncoding = new KSelectAction(i18n("&Encoding"), 0, actions, "set_encoding");
+      selectSetEncoding = new KSelectAction( i18n( "&Encoding" ), SmallIconSet( "charset" ), 0, this, SLOT(slotSetEncoding()), actions, "set_encoding" );
       QStringList list = KGlobal::charsets()->descriptiveEncodingNames();
       list.prepend( i18n( "Default" ) );
       selectSetEncoding->setItems(list);
       selectSetEncoding->setCurrentItem (0);
-      connect(selectSetEncoding, SIGNAL(activated()), SLOT(slotSetEncoding()));
       selectSetEncoding->plug(m_options);

       if (kapp->authorizeKAction("keyboard"))
Comment 17 LiuCougar 2005-03-04 01:15:19 UTC
I can not see this patch applied in my kde 3.3.2 (gentoo). Is this merged into the main line?
Comment 18 Waldo Bastian 2005-03-04 10:58:36 UTC
The KDE 3.3.x series is in maintenance mode. New features are for KDE 3.4 exclusively.