aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/file.cpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-01-29 23:54:05 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:46 +0100
commit4e71abc1c94647e600e6db322636707bdb9f5817 (patch)
tree0c532e7829ad5c9fab13db97c923dc3d70930abc /src/utils/file.cpp
parente3f328e4a24e2161fba58585e9f607c429b24c1b (diff)
downloadusdx-4e71abc1c94647e600e6db322636707bdb9f5817.tar.gz
usdx-4e71abc1c94647e600e6db322636707bdb9f5817.tar.xz
usdx-4e71abc1c94647e600e6db322636707bdb9f5817.zip
changed to boost::filesystem::wifstream to support wpath
wifstream from boost could be created with a boost::filesystem::wpath to support Unicode paths
Diffstat (limited to '')
-rw-r--r--src/utils/file.cpp7
1 files changed, 7 insertions, 0 deletions
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();