Show
Ignore:
Timestamp:
08.02.2001 13:17:33 (19 years ago)
Author:
sjboddie
Message:

Fixed a bug in the C++ encoding support - 8 bit encodings like windows-1251
were being treated as 16 bit encodings in some places

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/receptionist.cpp

    r1877 r1927  
    13001300 
    13011301  text_t subkey, subvalue, shortname, longname, mapfile; 
     1302  int multibyte = 0; 
    13021303  text_t::const_iterator cfglinesub_here; 
    13031304  text_tarray::const_iterator cfgline_here = cfgline.begin(); 
    13041305  text_tarray::const_iterator cfgline_end = cfgline.end(); 
    13051306  while (cfgline_here != cfgline_end) { 
    1306     cfglinesub_here = getdelimitstr((*cfgline_here).begin(), 
    1307                     (*cfgline_here).end(), '=', subkey); 
    1308     if (subkey == "shortname") { 
    1309       shortname = substr (cfglinesub_here, (*cfgline_here).end()); 
    1310     } else if (subkey == "longname") { 
    1311       longname = substr (cfglinesub_here, (*cfgline_here).end()); 
    1312     } else if (subkey == "map") { 
    1313       mapfile = substr (cfglinesub_here, (*cfgline_here).end()); 
     1307    if (*cfgline_here == "multibyte") { 
     1308      multibyte = 1; 
     1309    } else { 
     1310      cfglinesub_here = getdelimitstr((*cfgline_here).begin(), 
     1311                      (*cfgline_here).end(), '=', subkey); 
     1312      if (subkey == "shortname") { 
     1313    shortname = substr (cfglinesub_here, (*cfgline_here).end()); 
     1314      } else if (subkey == "longname") { 
     1315    longname = substr (cfglinesub_here, (*cfgline_here).end()); 
     1316      } else if (subkey == "map") { 
     1317    mapfile = substr (cfglinesub_here, (*cfgline_here).end()); 
     1318      } 
    13141319    } 
    13151320    cfgline_here++; 
     
    13451350      mapinconvertclass *mapinconvert = new mapinconvertclass(); 
    13461351      mapinconvert->setmapfile (to_uc_map, 0x003F); 
     1352      mapinconvert->set_multibyte (multibyte); 
    13471353      mapoutconvertclass *mapoutconvert = new mapoutconvertclass(); 
    13481354      mapoutconvert->setmapfile (from_uc_map, 0x3F); 
     1355      mapoutconvert->set_multibyte (multibyte); 
    13491356      mapoutconvert->set_rzws(1); 
    13501357      add_converter (shortname, mapinconvert, mapoutconvert);