GNOME Bugzilla – Bug 397159
Cannot open dia file "中文.dia"
Last modified: 2007-03-18 17:50:34 UTC
Please describe the problem: When I open a dia file which named in Chinese, it show an error message and then cannot open the file. If I rename the file to a English name, it opened correctly. Steps to reproduce: 1. Rename a dia file to "中文.dia" 2. Execute Dia and then open the file ("中文.dia") Actual results: Popup a message box and show "無法開啟'%s'來讀取資料". (It's mean that "Cannot open '%s' to read data") Expected results: Open the file correctly. Does this happen every time? yes Other information: My OS: WinXP sp2 Chinese-Trad version (zh-TW)
Could you try this again with the 0.96-pre1 version and the latest GTK+ version? Please uninstall Dia and GTK+ first. Then install GTK+ http://downloads.sourceforge.net/gimp-win/gtk%2B-2.10.6-1-setup.zip and Dia: http://downloads.sourceforge.net/dia-installer/dia-setup-0.96-pre1.zip?modtime=1167553098&big_mirror=0 Thanks! Steffen
I had tried gtk+-2.10.6-1-setup.zip + 0.96-pre1. There are tha same problem.
This is probably related to bug #131210.
In contrast to bug #131210 this one would require to use g_fopen() and other stuff from glib/gstdio.h, quite some change to do on the prerelease pre8 ;)
2007-03-17 Hans Breuer <hans@breuer.org> * app/app_procs.c app/autosave.c app/commands.c app/diaconv.c app/export_png.c app/filedlg.c app/load_save.c app/paginate_psprint.c app/preferences.c app/render_eps.c app/sheets_dialog.c app/sheets_dialog_callbacks.c lib/dia_dirs.c lib/dia_xml.c lib/diagdkrenderer.c plug-ins/cgm/cgm.c plug-ins/dxf/dxf-export.c plug-ins/dxf/dxf-import.c plug-ins/hpgl/hpgl.c plug-ins/metapost/render_metapost.c plug-ins/pgf/render_pgf.c plug-ins/pstricks/render_pstricks.c plug-ins/python/pydia-render.c plug-ins/shape/shape-export.c plug-ins/svg/render_svg.c plug-ins/vdx/vdx-export.c plug-ins/vdx/vdx-import.c plug-ins/wmf/wmf.cpp plug-ins/wpg/wpg.c plug-ins/xfig/xfig-export.c plug-ins/xfig/xfig-import.c plug-ins/xslt/xslt.c : use <glib/gstdio.h> to match GLib's filename encoding to the io functions used, that is: g_open, g_fopen, g_stat, g_unlink, g_mkdir, g_rename (, g_access, g_lstat, g_remove, g_freopen, g_chdir, g_rmdir). Also replace gzopen() with gzdopen(g_open(), ...) to properly handle unicode filenames; finally use g_mkstemp(). Fixes bug #131210 and bug #397159. To make this fully work on win32 a recent enough version of libxml2 is required - tested with 2.6.27 - but anything from 2.6.24 should do. * plug-ins/cairo/diacairo.c : special handling for cairo which currently only supports filenames in the C runtime locale.