diff -u kmid-original/kdisptext.h kdemultimedia-3.1.1/kmid/kdisptext.h
--- kmid-original/kdisptext.h	2001-05-01 06:33:46.000000000 +0700
+++ kdemultimedia-3.1.1/kmid/kdisptext.h	2003-07-24 01:13:47.000000000 +0700
@@ -52,7 +52,8 @@
 {
     Q_OBJECT
 private:
-    
+    QTextCodec *lyrics_codec;    
+
     QFontMetrics *qfmetr;
     QFont *qtextfont;
     
@@ -108,6 +109,9 @@
     void fontChanged(void);
     
     void saveLyrics(FILE *fh);
+    
+    // receives number of encoding in QTextCodecs in qtextcodeclist.h       
+    void setLyricsEncoding(int num);
 
 //    QSize sizeHint();
  
diff -u kmid-original/kdisptext.cpp kdemultimedia-3.1.1/kmid/kdisptext.cpp
--- kmid-original/kdisptext.cpp	2002-10-27 04:20:12.000000000 +0600
+++ kdemultimedia-3.1.1/kmid/kdisptext.cpp	2003-07-24 03:21:55.000000000 +0700
@@ -25,11 +25,13 @@
 #include <qpainter.h>
 #include <qfont.h>
 #include <qfontmetrics.h>
+#include <qtextcodec.h>
 #include <qrect.h>
 #include <kglobal.h>
 #include <kinstance.h>
 #include <kconfig.h>
 #include "version.h"
+#include "qtextcodecslist.h"
 
 
 #define NUMPREVLINES 2
@@ -59,6 +61,10 @@
   qfmetr=new QFontMetrics(*qtextfont);
   nvisiblelines=height()/qfmetr->lineSpacing();
   autoscrollv=0;
+  
+  // SG
+  lyrics_codec=QTextCodec::codecForLocale();
+  //fontChanged();
 }
 
 KDisplayText::~KDisplayText()
@@ -208,15 +214,15 @@
                         tmpx=5;
 
                         tmp->xpos=tmpx;
-                        if (tmp->spev->text[0]!=0) tmpw=qfmetr->width(&tmp->spev->text[1]);
+                        if (tmp->spev->text[0]!=0) tmpw=qfmetr->width(lyrics_codec->toUnicode(&tmp->spev->text[1]));
 				else tmpw=0;
-                        tmp->r=qfmetr->boundingRect(&tmp->spev->text[1]);
+                        tmp->r=qfmetr->boundingRect(lyrics_codec->toUnicode(&tmp->spev->text[1]));
                     }
                     else
                     {
                         tmp->xpos=tmpx;
-                        tmpw=qfmetr->width(tmp->spev->text);
-                        tmp->r=qfmetr->boundingRect(tmp->spev->text);
+                        tmpw=qfmetr->width(lyrics_codec->toUnicode(tmp->spev->text));
+                        tmp->r=qfmetr->boundingRect(lyrics_codec->toUnicode(tmp->spev->text));
                     }
 	// We add 5 pixels above, below and to the right because of a
 	// problem with latest released Xft
@@ -235,7 +241,7 @@
         maxX[(typeoftextevents==1)?0:1]=maxx+10;
         maxY[(typeoftextevents==1)?0:1]=
 		nlines_[(typeoftextevents==1)?0:1]*lineSpacing+descent+10;
- 
+
         if (typeoftextevents==1) typeoftextevents=5;
         else fin=1;
     }
@@ -278,7 +284,7 @@
        nlinestodraw++;
        t=t->next;
        }
-    
+
     i=0;
     while ((i<nlinestodraw)&&(tmpl!=NULL))
     {
@@ -286,18 +292,18 @@
         while ((tmp!=NULL)&&(tmp->spev->type!=typeoftextevents)) tmp=tmp->next;
         while (tmp!=NULL)
         {
-            if ( colorplayed && 
+            if ( colorplayed &&
                  //	(tmp->spev->absmilliseconds>=cursor->spev->absmilliseconds))
                  (tmp->spev->id>=cursor->spev->id))
             {
                 p->setPen(black);
                 colorplayed=0;
-            }	
-            
+            }
+
             if (IsLineFeed(tmp->spev->text[0],tmp->spev->type))
-                p->drawText(tmp->xpos,tmpl->ypos,&tmp->spev->text[1]);
+                p->drawText(tmp->xpos,tmpl->ypos,lyrics_codec->toUnicode(&tmp->spev->text[1]));
             else
-                p->drawText(tmp->xpos,tmpl->ypos,tmp->spev->text);
+                p->drawText(tmp->xpos,tmpl->ypos,lyrics_codec->toUnicode(tmp->spev->text));
 
 #ifdef DRAW_BOUNDING_RECTS
 	    p->setPen(red);
@@ -310,13 +316,13 @@
         i++;
         tmpl=tmpl->next;
     }
-    
+
 }
 
 
 void KDisplayText::resizeEvent(QResizeEvent *e)
 {
-    QScrollView::resizeEvent(e);  
+    QScrollView::resizeEvent(e);
     nvisiblelines=visibleHeight()/qfmetr->lineSpacing();
     if ( (nlines>nvisiblelines) || (nvisiblelines==0) )
         resizeContents(maxX[(typeoftextevents==1)?0:1],maxY[(typeoftextevents==1)?0:1]);
@@ -613,6 +619,27 @@
     
 }
 
+void KDisplayText::setLyricsEncoding(int i){
+  char tmp[128], *p2;
+  const char *p1;
+  QTextCodec *newcodec;  
+  
+  if (i<=0 || i>=QTextCodecsCount)
+    newcodec=QTextCodec::codecForLocale();
+  else{
+    for(p2=tmp, p1=QTextCodecs[i]; *p1 && *p1!=' '; *p2++=*p1++);
+    *p2='\0';
+    newcodec=QTextCodec::codecForName(tmp); 
+  }    
+  if (newcodec!=lyrics_codec){
+    if (newcodec){
+      lyrics_codec=newcodec;
+      fontChanged();
+    }else
+      printf("Codec not found for %s\n", QTextCodecs[i]);    
+  }      
+}
+
 
 /*QSize KDisplayText::sizeHint()
 {
diff -u kmid-original/main.cpp kdemultimedia-3.1.1/kmid/main.cpp
--- kmid-original/main.cpp	2002-01-26 23:26:42.000000000 +0600
+++ kdemultimedia-3.1.1/kmid/main.cpp	2003-07-23 16:24:49.000000000 +0700
@@ -26,6 +26,7 @@
 #include <signal.h>
 
 #include <qwidget.h>
+#include <qtextcodec.h>
 
 #include <kapplication.h>
 #include <klocale.h>
@@ -44,6 +45,7 @@
     printf("This is free software, and you are welcome to redistribute it\n");
     printf("under certain conditions\n");
 
+    QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
 /*
     struct sigaction act;
     act.sa_handler = SIG_DFL;
@@ -93,6 +95,8 @@
         };
 */
 
+
+    
     return app.exec();
 };
 
diff -u kmid-original/kmidclient.h kdemultimedia-3.1.1/kmid/kmidclient.h
--- kmid-original/kmidclient.h	2001-05-01 06:33:46.000000000 +0700
+++ kdemultimedia-3.1.1/kmid/kmidclient.h	2003-07-24 01:09:58.000000000 +0700
@@ -101,6 +101,7 @@
     int searchInCPL(int song); // Returns the index of song
 
     void fillInComboSongs(void);
+    void fillInEncodings(void);    
 
     int openFile(const char *filename);
     void allNotesOff(void);
@@ -169,6 +170,7 @@
     void slotSeek(int i);
     void slotSetVolume(int i);
     void slotSelectSong(int i);
+    void slotSelectEncoding(int i);
 
     void downloadFinished( KIO::Job * );
 
@@ -225,6 +227,7 @@
     KDisplayText *kdispt;
     QLabel *qlabelTempo;
     QComboBox *comboSongs;
+    QComboBox *comboEncodings;
     RhythmView *rhythmview;
 
     
diff -u kmid-original/kmidclient.cpp kdemultimedia-3.1.1/kmid/kmidclient.cpp
--- kmid-original/kmidclient.cpp	2002-12-06 02:48:31.000000000 +0600
+++ kdemultimedia-3.1.1/kmid/kmidclient.cpp	2003-07-24 01:34:25.000000000 +0700
@@ -60,9 +60,11 @@
 #include "channel.h"
 #include "version.h"
 #include "rhythmview.h"
+#include "qtextcodecslist.h"
 
 //#define TEMPHACK
 
+
 kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name)
     :QWidget(parent,name), DCOPObject("KMidIface")
 {
@@ -111,6 +113,10 @@
 
     comboSongs = new QComboBox(FALSE, this,"Songs");
     connect (comboSongs,SIGNAL(activated(int)),this,SLOT(slotSelectSong(int)));
+    
+    comboEncodings = new QComboBox(FALSE, this, "Encodings");
+    connect (comboEncodings,SIGNAL(activated(int)),this,SLOT(slotSelectEncoding(int)));
+    comboEncodings->setSizeLimit(QTextCodecsCount/2);
 
     rhythmview= new RhythmView( this, "RhythmView");
     rhythmview->setMaximumHeight(7);   
@@ -195,14 +201,17 @@
     QHBoxLayout *lh=new QHBoxLayout( lv );
     lh->addWidget( qlabelTempo );
     lh->addWidget( tempoLCD );
-    lh->addWidget( comboSongs, 1 );
-    lv->addSpacing(5);
+    lh->addWidget( comboSongs, 6 );
+    lv->addSpacing(5);    
+    lh->addWidget( comboEncodings, 1 );    
+    lv->addSpacing(5);        
     lv->addWidget( rhythmview );
     lv->addSpacing(2);
     QHBoxLayout *lh2=new QHBoxLayout( lv );
     lh2->addWidget( volumebar );
     lh2->addWidget( kdispt );
 
+    fillInEncodings();
 }
 
 /*void kmidClient::resizeEvent(QResizeEvent *) 
@@ -1208,6 +1217,7 @@
     generateCPL();
     initializing_songs=1;
     fillInComboSongs();
+    // SG !!!
     initializing_songs=0;
 }
 
@@ -1589,4 +1599,13 @@
 {
   ((KListAction*)actionCollection->action("play_order"))->setCurrentItem(i); 
 }
+void kmidClient::fillInEncodings(){
+  for(int i=0; i<QTextCodecsCount; i++)
+    comboEncodings->insertItem(QTextCodecs[i]);
+}
+void kmidClient::slotSelectEncoding(int i)
+{
+//  printf("SELECT ENCODING: %d\n", i);
+  kdispt->setLyricsEncoding(i);
+}
 #include "kmidclient.moc"
diff -N -u kmid-original/qtextcodecslist.h kdemultimedia-3.1.1/kmid/qtextcodecslist.h
--- kmid-original/qtextcodecslist.h	1970-01-01 07:00:00.000000000 +0700
+++ kdemultimedia-3.1.1/kmid/qtextcodecslist.h	2003-07-24 03:29:49.000000000 +0700
@@ -0,0 +1,56 @@
+// qtextcodecslist.h - list of encodings supported by QT
+#if !defined(QTEXTCODECSLIST)
+#define QTEXTCODECSLIST
+
+// Commented codecs don't work
+
+const char *const QTextCodecs[]={
+    "Default (System Locale)",
+    "CP1250 -- Central European",
+    "CP1251 -- Cyrillic",
+    "CP1252 -- Western",        
+    "CP1253 -- Greek",
+    "CP1254 -- Turkish",
+    "CP1255 -- Hebrew",
+    "CP1256 -- Arabic",
+    "CP1257 -- Baltic",
+    "CP1258",
+    "ISO8859-1 -- Western",
+    "ISO8859-2 -- Central European",
+    "ISO8859-3 -- Central European",
+    "ISO8859-4 -- Baltic",
+    "ISO8859-5 -- Cyrillic",
+    "ISO8859-6 -- Arabic",
+    "ISO8859-7 -- Greek",
+    // "ISO8859-8 -- Hebrew, visually ordered", - crashes KMid
+    "ISO8859-8-i -- Hebrew, logically ordered",
+    "ISO8859-9 -- Turkish",
+    "ISO8859-10",
+    "ISO8859-13",
+    "ISO8859-14",
+    "ISO8859-15 -- Western",
+    // "850",
+    // "866",
+    "CP874",    
+    // "Apple Roman",
+    "TIS-620 -- Thai",
+    "Big5 -- Chinese",
+    "Big5-HKSCS -- Chinese",
+    "eucJP -- Japanese",
+    "eucKR -- Korean",
+    "GB2312 -- Chinese",
+    "GBK -- Chinese",
+    "GB18030 -- Chinese",
+    "JIS7 -- Japanese",
+    "Shift-JIS -- Japanese",
+    "TSCII -- Tamil",
+    "UTF8 -- Unicode, 8-bit",
+     // "utf16 -- Unicode",
+    "KOI8-R -- Russian",
+    "KOI8-U -- Ukrainian",
+     // "Latin1"    
+};
+
+const int QTextCodecsCount=sizeof(QTextCodecs)/sizeof(char*);
+
+#endif
