GNOME Bugzilla – Bug 574393
utf-8 filename magic does not work for compressed files
Last modified: 2009-08-11 15:53:22 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
Any chance to get this fixed soon? Would a patch help? This is a showstopper for the Dia release (See #570592).
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?
Sure, it looks fine, so applied and commited, thanks! Daniel