
21 May
2008
21 May
'08
12:54 p.m.
Through google searches and examples I have found that using utf8_codecvt_facet from boost/program_options/detail/utf8_codecvt_facet.hpp allows me to imbue my std::wifstream like this: std::wifstream f(p.string().c_str()); std::locale loc; std::locale utf8loc(loc, new boost::program_options::detail::utf8_codecvt_facet()); f.imbue(utf8loc); and now the wifstream is able to read UTF-8 encoded files. However, I not been able to find any 'official' documentation of this feature, and I'm not really hooked on using undocumented features. Is there any documentation somewhere? /peter