From 4e71abc1c94647e600e6db322636707bdb9f5817 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 29 Jan 2010 23:54:05 +0100 Subject: changed to boost::filesystem::wifstream to support wpath wifstream from boost could be created with a boost::filesystem::wpath to support Unicode paths --- src/utils/file.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/utils/file.cpp') diff --git a/src/utils/file.cpp b/src/utils/file.cpp index a7fc87e8..f97fc2e4 100644 --- a/src/utils/file.cpp +++ b/src/utils/file.cpp @@ -39,6 +39,13 @@ namespace usdx file.imbue(loc); } + File::File(const boost::filesystem::wpath& path) : file(path, std::wifstream::in) + { + std::locale global_loc = std::locale(); + std::locale loc(global_loc, new boost::program_options::detail::utf8_codecvt_facet()); + file.imbue(loc); + } + File::~File(void) { file.close(); -- cgit v1.2.3