win xp: inkview fails on non-ascii filenames

Bug #488997 reported by h1repp
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Patrick Storz
0.92.x
Fix Released
Medium
Patrick Storz

Bug Description

With Inkscape 0.47-3 on a german Windows XP SP3 I found: InkVIEW is unable to open files with non-ascii characters (like umlauts) in the filename whereas InkSCAPE opens and writes them without problem, so this is an Inkview-only or Inkview-still bug. Files in question validate successfully as SVG 1.1 on validator.w3.org. Inkview _can_ open those files when renamed to a pure ascii name.

gdb reports only program termination with return value 01. Sysinternals Procmon shows one QueryDirectory with the filename as filter successfully returning the filename, and then, after some fiddling with glib20.mo, an orderly program shutdown. It seems that Inkview treats the QueryDirectory result as 'no matching file found' when in fact it returns the correct filename containing non-ascii characters.

I remember there were similar issues with former versions of Inkscape on non-utf-8 filesystems, but this one is on utf-8.

Tags: inkview win32

Related branches

su_v (suv-lp)
tags: added: inkview
h1repp (heinz-repp)
description: updated
Revision history for this message
jazzynico (jazzynico) wrote :

No reproduced on, Ubuntu 9.10, Inkscape 0.47pre4.
Win32 only?

tags: added: win32
Revision history for this message
su_v (suv-lp) wrote :

not reproduced with Inkscape 0.46+devel r22598 on OS X 10.5.8 (inkview is not distributed on OS X, test with local build and custom shell launcher script calling inkview instead of inkscape-bin)

Revision history for this message
Chris Morgan (chris.morgan) wrote :

This seems to have been reported more or less at http://portableapps.com/node/19503#comment-134858 and I've asked them there to report it here as well. They're reporting it as failing for Inkscape proper, not inkview (Inkscape Portable doesn't have inkview).

Revision history for this message
h1repp (heinz-repp) wrote :

Chris: I do not think this is the same bug. They talk about inkscape and a bug in saving tablet preferences, where probably unicode characters were written to the xml file, but read back incorrectly from there on a new start. This one is about not opening files with non-ascii characters in the filename ONLY by inkview on a win32 platform, and most likely due to misinterpreting the result of a QueryDirectory Call.

Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape 0.47.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
LiliCharlie (ruland) wrote :

I am a polyglot, and this bug renders many of my Spanish, Chinese, Portuguese, French, German, Italian, Dutch,... SVG files unusable with inkview. (In the case of Chinese — the world’s largest speech community — ALL files are unusable.)

I honestly believe that this bug affects the MAJORITY OF WORLD-WIDE USERS, as very few languages (English, Latin, Hawaiian) can be written using only ASCII characters. All other languages either use an expanded version of Latin or a non-Roman script.

This bug should therefore be rated among the HIGH PRIORITY issues.

Revision history for this message
jazzynico (jazzynico) wrote :

Attaching a modified version of inkscapec.exe (from http://kaioa.com/node/63) that works with inkview to help debugging.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

Apparently the filename is not correctly encoded in inkview.cpp, and fails later in xml/repr-io.cpp (sp_repr_read_file) with the following messages (file aaùùàà.svg):

** (inkview.exe:1352): WARNING **: Reading file: d:\Dev\SVG\aa\xf9\xf9\xe0\xe0.svg
** (inkview.exe:1352): CRITICAL **: Inkscape::XML::Document* sp_repr_read_file(const gchar*, const gchar*): assertion Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed

Revision history for this message
jazzynico (jazzynico) wrote :

Maybe a good candidate to solve the issue in main.cpp:1818 (replaceArgs()).
But I don't know how to reuse it in inkview. Could someone help?

Revision history for this message
LiliCharlie (ruland) wrote :

This result is in agreement with what I noticed. When running

inkview.exe *.svg

from command line Inkview simply IGNORES files with names containing characters outside ASCII and shows the first file with an ASCII-only file name.

Revision history for this message
Ragimiri (ragimiri) wrote :

Still not working with non-ASCII characters in filename (Windows 7, 32 bit).

Revision history for this message
Patrick Storz (ede123) wrote :
Changed in inkscape:
status: Triaged → Fix Committed
assignee: nobody → Eduard Braun (eduard-braun2)
jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 0.93
Revision history for this message
Patrick Storz (ede123) wrote :
Revision history for this message
LiliCharlie (ruland) wrote :

Inkscape releases 0.92.2 and 0.92.3: Inkview still won't start when there are non-ANSI characters in filenames (like Vietnamese "tập_tin.svg", Russian "файл.svg", Chinese "文件.svg" etc.). I'm on a 64 bit Windows 10 machine.

Revision history for this message
Patrick Storz (ede123) wrote :

The problem is that those characters are probably not representable in your system's code page, so additional work might be required to get a usable file name from the command line (if possible at all... depends on what glib/gtk do with the command line arguments)

Possible workarounds are
- drag&drop the file onto inkview executable
- use a shortcut with suitable parameters
- use the run dialog (Win+R)

Feel free to file a new bug for the remaining issue.

Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.