diff -aur libtorrent-0.12.3/src/download/download_constructor.cc libtorrent-0.12.3.gbk/src/download/download_constructor.cc
--- libtorrent-0.12.3/src/download/download_constructor.cc	2008-05-07 12:19:13.000000000 +0000
+++ libtorrent-0.12.3.gbk/src/download/download_constructor.cc	2008-10-02 14:09:16.000000000 +0000
@@ -328,6 +328,12 @@
   std::list<Path>::iterator pathLast         = pathList->end();
   EncodingList::const_iterator encodingFirst = m_encodingList->begin();
   EncodingList::const_iterator encodingLast  = m_encodingList->end();
+
+  for ( ; pathFirst != pathLast; ++ pathFirst) {
+  	pathFirst->conv_utf8();
+  }
+
+  pathFirst = pathList->begin();
   
   for ( ; encodingFirst != encodingLast; ++encodingFirst) {
     std::list<Path>::iterator itr = std::find_if(pathFirst, pathLast, rak::bind2nd(download_constructor_encoding_match(), encodingFirst->c_str()));
diff -aur libtorrent-0.12.3/src/torrent/path.cc libtorrent-0.12.3.gbk/src/torrent/path.cc
--- libtorrent-0.12.3/src/torrent/path.cc	2008-05-07 12:19:13.000000000 +0000
+++ libtorrent-0.12.3.gbk/src/torrent/path.cc	2008-10-02 14:48:25.000000000 +0000
@@ -37,6 +37,8 @@
 #include "config.h"
 
 #include <algorithm>
+#include <vector>
+#include "iconv.h"
 
 #include "exceptions.h"
 #include "path.h"
@@ -59,6 +61,36 @@
   }
 }
 
+static std::string
+convent_to_utf8(const std::string &s)
+{
+  iconv_t cd = iconv_open("UTF-8","GBK");
+  if ((int)cd== -1) {
+    return s;
+  }
+  const char *sb[]={s.c_str(),0};
+  size_t src_sz=s.size();
+  size_t dest_sz=src_sz*3/2;
+  std::vector<char> buf(dest_sz+1);
+  const char *db[]={&buf[0],0};
+  int r=iconv(cd,(char **)sb,&src_sz,(char **)db,&dest_sz);
+  iconv_close(cd);
+  if (r==-1) {
+    return s;
+  }
+  return std::string(&buf[0]);
+}
+
+void
+Path::conv_utf8() {
+  if (m_encoding.empty()) {
+    for (iterator itr = begin(); itr !=end(); ++itr) {
+      *itr=convent_to_utf8(*itr);
+    }
+    m_encoding="utf-8";
+  }
+}
+
 std::string
 Path::as_string() const {
   if (empty())
diff -aur libtorrent-0.12.3/src/torrent/path.h libtorrent-0.12.3.gbk/src/torrent/path.h
--- libtorrent-0.12.3/src/torrent/path.h	2008-05-07 12:19:13.000000000 +0000
+++ libtorrent-0.12.3.gbk/src/torrent/path.h	2008-10-02 14:03:36.000000000 +0000
@@ -92,6 +92,8 @@
   base_type*         base()                               { return this; }
   const base_type*   base() const                         { return this; }
 
+  void conv_utf8();
+
 private:
   std::string        m_encoding;
 };
