[Konsole-devel] [Bug 83236] Deleting Arabic text in terminals in response to an interactive command using BACKSPACE will delete the question itself

Waldo Bastian bastian at kde.org
Sun Jan 23 17:30:55 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=83236         
bastian kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From bastian kde org  2005-01-23 18:30 -------
CVS commit by waba: 

Add support for IUTF8
BUG: 83236


  M +5 -0      TEPty.cpp   1.88
  M +1 -0      TEPty.h   1.29
  M +3 -5      TEmulation.cpp   1.61
  M +3 -0      TEmulation.h   1.35
  M +13 -5     konsole.cpp   1.502
  M +2 -0      session.cpp   1.100


--- kdebase/konsole/konsole/TEPty.cpp  #1.87:1.88
 @ -94,4 +94,9  @ void TEPty::setXonXoff(bool on)
 }
 
+void TEPty::useUtf8(bool on)
+{
+  pty()->setUtf8Mode(on);
+}
+
 /*!
     start the client program.

--- kdebase/konsole/konsole/TEPty.h  #1.28:1.29
 @ -49,4 +49,5  @ Q_OBJECT
 
   public slots:
+    void useUtf8(bool on);
     void lockPty(bool lock);
     void send_bytes(const char* s, int len);

--- kdebase/konsole/konsole/TEmulation.cpp  #1.60:1.61
 @ -206,13 +206,11  @ void TEmulation::setCodec(const QTextCod
   delete decoder;
   decoder = m_codec->makeDecoder();
+  emit useUtf8(utf8());
 }
 
 void TEmulation::setCodec(int c)
 {
-  //FIXME: check whether we have to free m_codec
-  m_codec = c ? QTextCodec::codecForName("utf8")
-            : QTextCodec::codecForLocale();
-  delete decoder;
-  decoder = m_codec->makeDecoder();
+  setCodec(c ? QTextCodec::codecForName("utf8")
+           : QTextCodec::codecForLocale());
 }
 

--- kdebase/konsole/konsole/TEmulation.h  #1.34:1.35
 @ -65,4 +65,5  @ signals:
 
   void lockPty(bool);
+  void useUtf8(bool);
   void sndBlock(const char* txt,int len);
   void ImageSizeChanged(int lines, int columns);
 @ -84,4 +85,6  @ public:
   bool isConnected() { return connected; }
 
+  bool utf8() { return m_codec->mibEnum() == 106; }
+
   virtual void setListenToKeyPress(bool l);
   void setColumns(int columns);

--- kdebase/konsole/konsole/konsole.cpp  #1.501:1.502
 @ -843,7 +843,14  @ void Konsole::slotSetEncoding()
   if (!se) return;
 
+  QTextCodec * qtc;
+  if (selectSetEncoding->currentItem() == 0)
+  {
+    qtc = QTextCodec::codecForLocale();
+  }
+  else
+  {
   bool found;
   QString enc = KGlobal::charsets()->encodingForName(selectSetEncoding->currentText());
-  QTextCodec * qtc = KGlobal::charsets()->codecForName(enc, found);
+    qtc = KGlobal::charsets()->codecForName(enc, found);
   if(!found)
   {
 @ -851,4 +858,5  @ void Konsole::slotSetEncoding()
     qtc = QTextCodec::codecForLocale();
   }
+  }
 
   se->setEncodingNo(selectSetEncoding->currentItem());

--- kdebase/konsole/konsole/session.cpp  #1.99:1.100
 @ -71,4 +71,5  @ TESession::TESession(TEWidget* _te, cons
   //kdDebug(1211)<<"TESession ctor() sh->setSize()"<<endl;
   sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary
+  sh->useUtf8(em->utf8());
   //kdDebug(1211)<<"TESession ctor() connecting"<<endl;
   connect( sh,SIGNAL(block_in(const char*,int)),this,SLOT(onRcvBlock(const char*,int)) );
 @ -76,4 +77,5  @ TESession::TESession(TEWidget* _te, cons
   connect( em,SIGNAL(sndBlock(const char*,int)),sh,SLOT(send_bytes(const char*,int)) );
   connect( em,SIGNAL(lockPty(bool)),sh,SLOT(lockPty(bool)) );
+  connect( em,SIGNAL(useUtf8(bool)),sh,SLOT(useUtf8(bool)) );
 
   connect( em, SIGNAL( changeTitle( int, const QString & ) ),



More information about the konsole-devel mailing list