diff --git a/src/app/crash/session.cpp b/src/app/crash/session.cpp index f234149ea..827f6a6f5 100644 --- a/src/app/crash/session.cpp +++ b/src/app/crash/session.cpp @@ -53,7 +53,11 @@ void Session::create(base::pid pid) { m_pid = pid; +#ifdef _WIN32 + std::ofstream of(base::from_utf8(pidFilename())); +#else std::ofstream of(pidFilename()); +#endif of << m_pid; } diff --git a/src/app/document_exporter.cpp b/src/app/document_exporter.cpp index 514dad5e6..6f00671db 100644 --- a/src/app/document_exporter.cpp +++ b/src/app/document_exporter.cpp @@ -20,6 +20,7 @@ #include "base/convert_to.h" #include "base/path.h" #include "base/shared_ptr.h" +#include "base/string.h" #include "base/unique_ptr.h" #include "doc/algorithm/shrink_bounds.h" #include "doc/cel.h" @@ -264,7 +265,11 @@ Document* DocumentExporter::exportSheet() if (m_dataFilename.empty()) osbuf = std::cout.rdbuf(); else { +#ifdef _WIN32 + fos.open(base::from_utf8(m_dataFilename).c_str(), std::ios::out); +#else fos.open(m_dataFilename.c_str(), std::ios::out); +#endif osbuf = fos.rdbuf(); } std::ostream os(osbuf); diff --git a/src/app/res/http_loader.cpp b/src/app/res/http_loader.cpp index 2d94be687..bf55ab3c5 100644 --- a/src/app/res/http_loader.cpp +++ b/src/app/res/http_loader.cpp @@ -12,10 +12,11 @@ #include "app/res/http_loader.h" #include "base/bind.h" -#include "base/replace_string.h" #include "base/fs.h" #include "base/path.h" +#include "base/replace_string.h" #include "base/scoped_value.h" +#include "base/string.h" #include "net/http_request.h" #include "net/http_response.h" @@ -58,7 +59,11 @@ void HttpLoader::threadHttpRequest() base::replace_string(fn, "&", "-"); fn = base::join_path(dir, fn); +#ifdef _WIN32 + std::ofstream output(base::from_utf8(fn).c_str()); +#else std::ofstream output(fn.c_str()); +#endif net::HttpRequest http(m_url); net::HttpResponse response(&output); http.send(response);