summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/wpg-input.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-21 23:03:48 +0000
committerJabiertxof <jtx@jtx>2017-01-21 23:03:48 +0000
commit29a2125fbad631e51c4286adf831279a7779e693 (patch)
treecc2749bd7eaa82b6cc23aede773ba7cf9a5f7a3c /src/extension/internal/wpg-input.cpp
parentRelay LPE on widgets and optionaly write on text inputs (diff)
parentFix "swap fill and stroke" for multiple objects in selection (diff)
downloadinkscape-29a2125fbad631e51c4286adf831279a7779e693.tar.gz
inkscape-29a2125fbad631e51c4286adf831279a7779e693.zip
Update to trunk
(bzr r15356.1.14)
Diffstat (limited to 'src/extension/internal/wpg-input.cpp')
-rw-r--r--src/extension/internal/wpg-input.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp
index 54a14fc72..12457791b 100644
--- a/src/extension/internal/wpg-input.cpp
+++ b/src/extension/internal/wpg-input.cpp
@@ -81,6 +81,13 @@ namespace Internal {
SPDocument *WpgInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri)
{
+ #ifdef WIN32
+ // RVNGFileStream uses fopen() internally which unfortunately only uses ANSI encoding on Windows
+ // therefore attempt to convert uri to the system codepage
+ // even if this is not possible the alternate short (8.3) file name will be used if available
+ uri = g_win32_locale_filename_from_utf8(uri);
+ #endif
+
RVNGInputStream* input = new RVNGFileStream(uri);
#if WITH_LIBWPG03
if (input->isStructured()) {