Switch to unified view

a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp
...
...
342
// Get charset to be used for transcoding to utf-8 if unspecified by doc
342
// Get charset to be used for transcoding to utf-8 if unspecified by doc
343
// For document contents:
343
// For document contents:
344
//  If defcharset was set (from the config or a previous call, this
344
//  If defcharset was set (from the config or a previous call, this
345
//   is done in setKeydir), use it.
345
//   is done in setKeydir), use it.
346
//  Else, try to guess it from the locale
346
//  Else, try to guess it from the locale
347
//  Use iso8859-1 as ultimate default
347
//  Use cp1252 (as a superset of iso8859-1) as ultimate default
348
//
348
//
349
// For filenames, same thing except that we do not use the config file value
349
// For filenames, same thing except that we do not use the config file value
350
// (only the locale).
350
// (only the locale).
351
const string& RclConfig::getDefCharset(bool filename) 
351
const string& RclConfig::getDefCharset(bool filename) 
352
{
352
{
...
...
370
        && strcmp(cp, "646")
370
        && strcmp(cp, "646")
371
#endif
371
#endif
372
        ) {
372
        ) {
373
        localecharset = string(cp);
373
        localecharset = string(cp);
374
    } else {
374
    } else {
375
      // Note: it seems that all versions of iconv will take
375
      // Use cp1252 instead of iso-8859-1, it's a superset.
376
      // iso-8859. Some won't take iso8859
377
        localecharset = string(cstr_iso_8859_1);
376
        localecharset = string(cstr_cp1252);
378
    }
377
    }
379
    LOGDEB1(("RclConfig::getDefCharset: localecharset [%s]\n",
378
    LOGDEB1(("RclConfig::getDefCharset: localecharset [%s]\n",
380
        localecharset.c_str()));
379
        localecharset.c_str()));
381
    }
380
    }
382
381