Index: /trunk/gsdl/etc/main.cfg
===================================================================
--- /trunk/gsdl/etc/main.cfg	(revision 1926)
+++ /trunk/gsdl/etc/main.cfg	(revision 1927)
@@ -89,4 +89,6 @@
 #              option is mandatory for all encoding lines except the
 #              special case for utf8.
+# multibyte -- This optional argument should be set for all encodings that use
+#              multibyte characters.
 
 # The utf8 encoding is handled internally and doesn't require a map file.
@@ -125,8 +127,8 @@
 
 # CJK encodings (note that Shift-JIS Japanese isn't currently supported)
-Encoding shortname=gbk "longname=Chinese Simplified (GBK)" map=gbk.ump
-Encoding shortname=big5 "longname=Chinese Traditional (Big5)" map=big5.ump
-Encoding shortname=euc-jp "longname=Japanese (EUC)" map=euc_jp.ump
-Encoding shortname=euc-kr "longname=Korean (UHC)" map=uhc.ump
+Encoding shortname=gbk "longname=Chinese Simplified (GBK)" map=gbk.ump multibyte
+Encoding shortname=big5 "longname=Chinese Traditional (Big5)" map=big5.ump multibyte
+Encoding shortname=euc-jp "longname=Japanese (EUC)" map=euc_jp.ump multibyte
+Encoding shortname=euc-kr "longname=Korean (UHC)" map=uhc.ump multibyte
 
 
Index: /trunk/gsdl/lib/gsdlunicode.cpp
===================================================================
--- /trunk/gsdl/lib/gsdlunicode.cpp	(revision 1926)
+++ /trunk/gsdl/lib/gsdlunicode.cpp	(revision 1927)
@@ -384,4 +384,5 @@
 
 mapinconvertclass::mapinconvertclass () {
+  multibyte = 0;
   mapbuflen = 0;
 }
@@ -425,6 +426,10 @@
       // got a complete character
       if (charlen == 1) {
-	// ascii character
-	output.push_back (mapbuf[0]);
+	if (mapbuf[0] < 0x80) {
+	  // ascii character
+	  output.push_back (mapbuf[0]);
+	} else {
+	  output.push_back (converter.convert((unsigned short)mapbuf[0]));
+	}
 
       } else {
@@ -448,4 +453,5 @@
 
 mapoutconvertclass::mapoutconvertclass () {
+  multibyte = 0;
   mapbuflen=0; 
   mapbufhere=0;
@@ -500,7 +506,12 @@
 	} else {
 	  outc = converter.convert (*texthere);
-	  mapbuf[0] = (unsigned char)(outc >> 8);
-	  mapbuf[1] = (unsigned char)(outc & 0xff);
-	  mapbuflen = 2;
+	  if (multibyte) {
+	    mapbuf[0] = (unsigned char)(outc >> 8);
+	    mapbuf[1] = (unsigned char)(outc & 0xff);
+	    mapbuflen = 2;
+	  } else {
+	    mapbuf[0] = outc;
+	    mapbuflen = 1;
+	  }
 	}
       }
Index: /trunk/gsdl/lib/gsdlunicode.h
===================================================================
--- /trunk/gsdl/lib/gsdlunicode.h	(revision 1926)
+++ /trunk/gsdl/lib/gsdlunicode.h	(revision 1927)
@@ -153,4 +153,6 @@
   };
 
+  void set_multibyte (int new_multibyte) {multibyte = new_multibyte;};
+
   void reset ();
   void convert (text_t &output, status_t &status);
@@ -160,4 +162,5 @@
   unsigned char mapbuf[MAXMAPCHARLEN];
   size_t mapbuflen;
+  int multibyte;
 
   // note: multiple instances of mapinconvert class are expensive
@@ -172,4 +175,5 @@
     if (mapbuflen == 0) return 0;
     if (mapbuf[0] < 0x80) return 1;
+    if (!multibyte) return 1;
     return 2;
   }
@@ -194,4 +198,6 @@
   };
 
+  void set_multibyte (int new_multibyte) {multibyte = new_multibyte;};
+
   void reset ();
   void convert (char *output, size_t maxlen, 
@@ -202,4 +208,5 @@
   size_t mapbuflen;
   size_t mapbufhere;
+  int multibyte;
 
   mapconvert converter;
Index: /trunk/gsdl/src/recpt/receptionist.cpp
===================================================================
--- /trunk/gsdl/src/recpt/receptionist.cpp	(revision 1926)
+++ /trunk/gsdl/src/recpt/receptionist.cpp	(revision 1927)
@@ -1300,16 +1300,21 @@
 
   text_t subkey, subvalue, shortname, longname, mapfile;
+  int multibyte = 0;
   text_t::const_iterator cfglinesub_here;
   text_tarray::const_iterator cfgline_here = cfgline.begin();
   text_tarray::const_iterator cfgline_end = cfgline.end();
   while (cfgline_here != cfgline_end) {
-    cfglinesub_here = getdelimitstr((*cfgline_here).begin(),
-				    (*cfgline_here).end(), '=', subkey);
-    if (subkey == "shortname") {
-      shortname = substr (cfglinesub_here, (*cfgline_here).end());
-    } else if (subkey == "longname") {
-      longname = substr (cfglinesub_here, (*cfgline_here).end());
-    } else if (subkey == "map") {
-      mapfile = substr (cfglinesub_here, (*cfgline_here).end());
+    if (*cfgline_here == "multibyte") {
+      multibyte = 1;
+    } else {
+      cfglinesub_here = getdelimitstr((*cfgline_here).begin(),
+				      (*cfgline_here).end(), '=', subkey);
+      if (subkey == "shortname") {
+	shortname = substr (cfglinesub_here, (*cfgline_here).end());
+      } else if (subkey == "longname") {
+	longname = substr (cfglinesub_here, (*cfgline_here).end());
+      } else if (subkey == "map") {
+	mapfile = substr (cfglinesub_here, (*cfgline_here).end());
+      }
     }
     cfgline_here++;
@@ -1345,6 +1350,8 @@
 	  mapinconvertclass *mapinconvert = new mapinconvertclass();
 	  mapinconvert->setmapfile (to_uc_map, 0x003F);
+	  mapinconvert->set_multibyte (multibyte);
 	  mapoutconvertclass *mapoutconvert = new mapoutconvertclass();
 	  mapoutconvert->setmapfile (from_uc_map, 0x3F);
+	  mapoutconvert->set_multibyte (multibyte);
 	  mapoutconvert->set_rzws(1);
 	  add_converter (shortname, mapinconvert, mapoutconvert);
