After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574393 - utf-8 filename magic does not work for compressed files
utf-8 filename magic does not work for compressed files
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
2.7.3
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks: 570592
 
 
Reported: 2009-03-06 16:51 UTC by Hans Breuer
Modified: 2009-08-11 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use _wopen()/gzdopen() for utf-8 filenames on win32 (2.17 KB, patch)
2009-08-10 20:53 UTC, Hans Breuer
none Details | Review

Description Hans Breuer 2009-03-06 16:51:13 UTC
there is some magic in xmlIO.c xmlWrapOpen* which tries to support utf-8 filename encoding and native filename encoding within the the same call. While this apparently works for uncompressed files it is not implemented for gzipped files.
In the latter case the filename is just passed to gzopen() without checking it's encoding. All versions of zlib for windows I've seen just implement native filename encoding, so this is going break the magic.
One way to implement would be to use gzdopen() for utf-8 filenames, i.e. first open the file with _wopen() from the crt and than pass the numeric file descriptor to zlib, see e.g. g_open() and dia/lib/dia_xml.c
Comment 1 Steffen Macke 2009-05-05 20:27:51 UTC
Any chance to get this fixed soon? 
Would a patch help?
This is a showstopper for the Dia release (See #570592).
Comment 2 Hans Breuer 2009-08-10 20:53:19 UTC
Created attachment 140376 [details] [review]
use _wopen()/gzdopen() for utf-8 filenames on win32

The attached patch tries to follow the same pattern used for the uncompressed utf-8 case. It is tested under win32 with Dia. Any chance to get it applied?
Comment 3 Daniel Veillard 2009-08-11 15:53:22 UTC
Sure, it looks fine, so applied and commited,

  thanks!

Daniel