diff -ur kdebase-3.0.orig/kcontrol/kio/smbrodlg.cpp kdebase-3.0/kcontrol/kio/smbrodlg.cpp
--- kdebase-3.0.orig/kcontrol/kio/smbrodlg.cpp	Fri Oct 26 20:55:16 2001
+++ kdebase-3.0/kcontrol/kio/smbrodlg.cpp	Sun Apr  7 18:54:04 2002
@@ -20,6 +20,7 @@
 
 #include <qlayout.h>
 #include <qlabel.h>
+#include <qstringlist.h>
 
 #include <klocale.h>
 #include <kconfig.h>
@@ -37,38 +38,53 @@
    QLabel *label=new QLabel(i18n("This is the configuration for the samba client only, not the server."),this);
    layout->addMultiCellWidget(label,0,0,0,1);
 
-   m_userLe=new QLineEdit("",this);
+   m_userLe=new KLineEdit("",this);
    label=new QLabel(m_userLe,i18n("Default user name:"),this);
    layout->addWidget(label,1,0);
    layout->addWidget(m_userLe,1,1);
 
-   m_passwordLe=new QLineEdit("",this);
+   m_passwordLe=new KLineEdit("",this);
    m_passwordLe->setEchoMode(QLineEdit::Password);
    label=new QLabel(m_passwordLe,i18n("Default password:"),this);
    layout->addWidget(label,2,0);
    layout->addWidget(m_passwordLe,2,1);
 
-   m_workgroupLe=new QLineEdit("",this);
+   m_workgroupLe=new KLineEdit("",this);
    label=new QLabel(m_workgroupLe,i18n("Workgroup:"),this);
    layout->addWidget(label,3,0);
    layout->addWidget(m_workgroupLe,3,1);
 
+   m_useTerminalCode=new QCheckBox(i18n("Use terminal code"),this);
+   layout->addMultiCellWidget(m_useTerminalCode,4,4,0,1);
+
+   m_terminalCodeBox=new KComboBox(false,this);
+   QStringList _stringList=terminalCodeList();
+   m_terminalCodeBox->insertStringList(_stringList);
+   terminalCodeLabel=new QLabel(m_terminalCodeBox,i18n("Terminal code:"),this);
+   layout->addWidget(terminalCodeLabel,5,0);
+   layout->addWidget(m_terminalCodeBox,5,1);
+
    m_showHiddenShares=new QCheckBox(i18n("Show hidden shares"),this);
-   layout->addMultiCellWidget(m_showHiddenShares,4,4,0,1);
+   layout->addMultiCellWidget(m_showHiddenShares,6,6,0,1);
 
-   layout->addWidget(new QWidget(this),5,0);
+   layout->addWidget(new QWidget(this),7,0);
 
    connect(m_showHiddenShares, SIGNAL(toggled(bool)), this, SLOT(changed()));
    connect(m_userLe, SIGNAL(textChanged(const QString&)), this, SLOT(changed()));
    connect(m_passwordLe, SIGNAL(textChanged(const QString&)), this, SLOT(changed()));
    connect(m_workgroupLe, SIGNAL(textChanged(const QString&)), this, SLOT(changed()));
+   connect(m_useTerminalCode, SIGNAL(clicked()), this, SLOT(changed()));
+   connect(m_useTerminalCode, SIGNAL(clicked()), this, SLOT(slotUseTerminalCode()));
+   connect(m_terminalCodeBox, SIGNAL(activated(int)), this, SLOT(changed()));
 
    layout->setRowStretch(0,0);
    layout->setRowStretch(1,0);
    layout->setRowStretch(2,0);
    layout->setRowStretch(3,0);
    layout->setRowStretch(4,0);
-   layout->setRowStretch(5,1);
+   layout->setRowStretch(5,0);
+   layout->setRowStretch(6,0);
+   layout->setRowStretch(7,1);
 
    layout->activate();
    // finaly read the options
@@ -89,6 +105,16 @@
    m_workgroupLe->setText(cfg->readEntry("Workgroup",""));
    m_showHiddenShares->setChecked(cfg->readBoolEntry("ShowHiddenShares",false));
 
+   m_useTerminalCode->setChecked(cfg->readBoolEntry("UseTerminalCode", false));
+   QStringList _stringList=terminalCodeList();
+   int _index=_stringList.findIndex(cfg->readEntry("TerminalCode",""));
+   if (_index == -1 )
+       _index=0;
+   m_terminalCodeBox->setCurrentItem(_index);
+   bool check = m_useTerminalCode->isChecked();
+   terminalCodeLabel->setEnabled(check);
+   m_terminalCodeBox->setEnabled(check);
+
    // unscramble
    QString scrambled = cfg->readEntry( "Password","" );
    QString password = "";
@@ -116,6 +142,8 @@
    cfg->writeEntry( "User", m_userLe->text());
    cfg->writeEntry( "Workgroup", m_workgroupLe->text());
    cfg->writeEntry( "ShowHiddenShares", m_showHiddenShares->isChecked());
+   cfg->writeEntry( "UseTerminalCode", m_useTerminalCode->isChecked() );
+   cfg->writeEntry( "TerminalCode", m_terminalCodeBox->currentText() );
 
    //taken from Nicola Brodu's smb ioslave
    //it's not really secure, but at
@@ -144,6 +172,10 @@
    m_passwordLe->setText("");
    m_workgroupLe->setText("");
    m_showHiddenShares->setChecked(false);
+   m_useTerminalCode->setChecked(false);
+   m_terminalCodeBox->setCurrentItem(0);
+   terminalCodeLabel->setEnabled(false);
+   m_terminalCodeBox->setEnabled(false);
 }
 
 void SMBRoOptions::changed()
@@ -171,6 +203,29 @@
         "Passwords will be stored locally, and scrambled so as to render them "
         "unreadable to the human eye. For security reasons, you may not want to "
         "do that, as entries with passwords are clearly indicated as such.<p>");
+}
+
+QStringList SMBRoOptions::terminalCodeList() const
+{
+    QStringList _strList;
+    _strList.append( QString::fromLatin1( "euc" ) );
+    _strList.append( QString::fromLatin1( "sjis" ) );
+    _strList.append( QString::fromLatin1( "jis7" ) );
+    _strList.append( QString::fromLatin1( "jis8" ) );
+    _strList.append( QString::fromLatin1( "junet" ) );
+    _strList.append( QString::fromLatin1( "hex" ) );
+    _strList.append( QString::fromLatin1( "cap" ) );
+    _strList.append( QString::fromLatin1( "utf8" ) );
+    _strList.append( QString::fromLatin1( "euc3" ) );
+
+    return _strList;
+}
+
+void SMBRoOptions::slotUseTerminalCode()
+{
+    bool check = m_useTerminalCode->isChecked();
+    terminalCodeLabel->setEnabled( check );
+    m_terminalCodeBox->setEnabled( check );
 }
 
 #include "smbrodlg.moc"
diff -ur kdebase-3.0.orig/kcontrol/kio/smbrodlg.h kdebase-3.0/kcontrol/kio/smbrodlg.h
--- kdebase-3.0.orig/kcontrol/kio/smbrodlg.h	Wed Jan  3 01:55:08 2001
+++ kdebase-3.0/kcontrol/kio/smbrodlg.h	Sun Apr  7 18:54:04 2002
@@ -19,12 +19,13 @@
 */
 
 #ifndef __SMBRODLG_H
-#define __SMBRODLG_H 
+#define __SMBRODLG_H
 
 #include <qwidget.h>
-#include <qlineedit.h>
 #include <qcheckbox.h>
 
+#include <klineedit.h>
+#include <kcombobox.h>
 #include <kcmodule.h>
 
 
@@ -42,12 +43,18 @@
 
    private slots:
       void changed();
+      void slotUseTerminalCode();
 
    private:
-      QLineEdit *m_userLe;
-      QLineEdit *m_passwordLe;
-      QLineEdit *m_workgroupLe;
+      QStringList terminalCodeList() const;
+
+      KLineEdit *m_userLe;
+      KLineEdit *m_passwordLe;
+      KLineEdit *m_workgroupLe;
+      KComboBox *m_terminalCodeBox;
       QCheckBox *m_showHiddenShares;
+      QCheckBox *m_useTerminalCode;
+      QLabel *terminalCodeLabel;
 };
 
 #endif
diff -ur kdebase-3.0.orig/kioslave/smbro/kio_smb.cpp kdebase-3.0/kioslave/smbro/kio_smb.cpp
--- kdebase-3.0.orig/kioslave/smbro/kio_smb.cpp	Fri Mar  8 10:16:52 2002
+++ kdebase-3.0/kioslave/smbro/kio_smb.cpp	Sun Apr  7 18:54:04 2002
@@ -113,6 +113,8 @@
 ,m_shareAccessingPassword("")
 ,m_shareAccessingUser("")*/
 ,m_workgroup("")
+,m_useTerminalCode(false)
+,m_terminalCode("")
 {
    kdDebug(7101)<<"Smb::Smb: -"<<pool<<"-"<<endl;
    m_processes.setAutoDelete(true);
@@ -133,6 +135,8 @@
   cfg->setGroup("Browser Settings/SMBro");
   m_user=cfg->readEntry("User","");
   m_workgroup=cfg->readEntry("Workgroup","");
+  m_useTerminalCode=cfg->readBoolEntry("UseTerminalCode",false);
+  m_terminalCode=cfg->readEntry("TerminalCode","");
   m_showHiddenShares=cfg->readBoolEntry("ShowHiddenShares",false);
 
   // unscramble, taken from Nicola Brodu's smb ioslave
@@ -403,6 +407,8 @@
       args<<QCString("-I")+m_ip;
    if (!m_workgroup.isEmpty())
       args<<QCString("-W")+m_workgroup.local8Bit();
+   if (m_useTerminalCode && !m_terminalCode.isEmpty())
+      args<<QCString("-t")+m_terminalCode.latin1();
    if (!proc->start("smbclient",args))
    {
       error( KIO::ERR_CANNOT_LAUNCH_PROCESS, "smbclient"+i18n("\nMake sure that the samba package is installed properly on your system."));
@@ -433,9 +439,11 @@
          if (!user.isEmpty())
             tmpArgs<<QCString("-U")+user.local8Bit();
          if (!m_ip.isEmpty())
-            args<<QCString("-I")+m_ip;
+            tmpArgs<<QCString("-I")+m_ip;
          if (!m_workgroup.isEmpty())
             tmpArgs<<QCString("-W")+m_workgroup.local8Bit();
+         if (m_useTerminalCode && !m_terminalCode.isEmpty())
+            tmpArgs<<QCString("-t")+m_terminalCode.latin1();
          if (!proc->start("smbclient",tmpArgs))
          {
             error( KIO::ERR_CANNOT_LAUNCH_PROCESS, "smbclient"+i18n("\nMake sure that the samba package is installed properly on your system."));
@@ -1198,6 +1206,8 @@
       args<<QCString("-U")+m_user.local8Bit();
    if (!m_ip.isEmpty())
       args<<QCString("-I")+m_ip;
+   if (m_useTerminalCode && !m_terminalCode.isEmpty())
+      args<<QCString("-t")+m_terminalCode.latin1();
 
    if (!proc->start("smbclient",args))
    {
@@ -1232,7 +1242,9 @@
          if (!user.isEmpty())
             tmpArgs<<QCString("-U")+user.local8Bit();
          if (!m_ip.isEmpty())
-            args<<QCString("-I")+m_ip;
+            tmpArgs<<QCString("-I")+m_ip;
+         if (m_useTerminalCode && !m_terminalCode.isEmpty())
+            tmpArgs<<QCString("-t")+m_terminalCode.latin1();
          if (!proc->start("smbclient",tmpArgs))
          {
             error( KIO::ERR_CANNOT_LAUNCH_PROCESS, "smbclient"+i18n("\nMake sure that the samba package is installed properly on your system."));
diff -ur kdebase-3.0.orig/kioslave/smbro/kio_smb.h kdebase-3.0/kioslave/smbro/kio_smb.h
--- kdebase-3.0.orig/kioslave/smbro/kio_smb.h	Fri Jan 19 01:58:54 2001
+++ kdebase-3.0/kioslave/smbro/kio_smb.h	Sun Apr  7 18:54:04 2002
@@ -83,8 +83,10 @@
 
       //configuration data
       bool m_showHiddenShares;
+      bool m_useTerminalCode;
       QString m_password;
       QString m_user;
+      QString m_terminalCode;
       /*QString m_shareListingPassword;
       QString m_shareListingUser;
 
