Boost logo

Boost :

Subject: [boost] [boost[program options] locale support
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2010-06-21 05:28:47


from the documentation [1] : "[...] the library uses the
codecvt<wchar_t, char> locale facet from the global locale."
The quote is taken from the unicode-documentation part. May i ask why
the locale is taken from the global locale, instead of the locale
assigned to the stream?

What I'd like to do is (currently yields a logic_error)

  // assume stream contains "a = 1,2"
  // ...
  std::locale loc("German_Germany");
  po::parse_config_file(stream, opts, false);

instead i have to

  std::locale loc("German_Germany");
  po::parse_config_file(stream, opts, false);

to parse the config file correctly.

Best regards,

[1] "

Boost list run by bdawes at, gregod at, cpdaniel at, john at