Changeset 10563


Ignore:
Timestamp:
2005-08-25T13:24:14+12:00 (19 years ago)
Author:
jrm21
Message:

if we don't support the default_encoding, then instead of always using ""
we'll use the encoding set in main.cfg if there is only 1 supported encoding

File:
1 edited

Legend:

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

    r9931 r10563  
    531531
    532532  // make sure the encoding is valid
    533   if (converters.find(default_encoding) == converters.end()) return "";
     533  if (converters.find(default_encoding) == converters.end()) {
     534    // we don't support the encoding specified as default for this language
     535    if (configinfo.encodings.size()==1) {
     536      // only 1 encoding specified in main.cfg, so use it
     537      return configinfo.encodings.begin()->second;
     538    }
     539    return "";
     540  }
    534541
    535542  return default_encoding;
Note: See TracChangeset for help on using the changeset viewer.