summaryrefslogtreecommitdiffstats
path: root/printing/printed_document.cc
diff options
context:
space:
mode:
Diffstat (limited to 'printing/printed_document.cc')
-rw-r--r--printing/printed_document.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/printing/printed_document.cc b/printing/printed_document.cc
index aa9ab5b..785b846 100644
--- a/printing/printed_document.cc
+++ b/printing/printed_document.cc
@@ -263,7 +263,13 @@ void PrintedDocument::DebugDump(const PrintedPage& page) {
filename += L"_";
filename += StringPrintf(L"%02d", page.page_number());
filename += L"_.emf";
- file_util::ReplaceIllegalCharacters(&filename, '_');
+#if defined(OS_WIN)
+ file_util::ReplaceIllegalCharactersInPath(&filename, '_');
+#else
+ std::string narrow_filename = WideToUTF8(filename);
+ file_util::ReplaceIllegalCharactersInPath(&narrow_filename, '_');
+ filename = UTF8ToWide(narrow_filename);
+#endif
std::wstring path(g_debug_dump_info->debug_dump_path);
file_util::AppendToPath(&path, filename);
#if defined(OS_WIN)