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 131210 - utf-8/locale issues : file access with localized filename
utf-8/locale issues : file access with localized filename
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
0.94
Other Windows
: Normal normal
: 0.96
Assigned To: Dia maintainers
Dia maintainers
: 151639 337148 339283 348654 366121 417451 481328 482981 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-01-12 09:30 UTC by Bartosz Wagner
Modified: 2007-10-03 18:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bartosz Wagner 2004-01-12 09:30:56 UTC
If a diagramm contains an image and the path of this image contains some 
spezific german characters like ä,ö,ü,ß it is imposible to reopen this 
diagramm after you have saved it.
Exact:
1. new diagramm
2. include image
3. spezialize the image source (the path will contain a directory like: 
c:\diagramme\präsentationen\bild1.jpg)
4. save the diagramm to e.g. test.dia
5. close dia
6. open dia
7. try to open the diagramm test.dia
8. error screen: "Error loading diagram C:\diagramme\test.dia. Unknown 
file type"
(this error will occur on a linux machine also))
Comment 1 Hans Breuer 2004-02-06 22:18:47 UTC
2004-02-06  Hans Breuer  <hans@breuer.org>

	[fixing #131210, but umlauts in the 'main' filename still not really 
	 supported on systems where filesystem encoding != utf8
	(Problems with recent file menu and window title)]
	* lib/dia_xml.[hc] : add data_filename() and data_add_filename()
	to deal with possible differnces in filename encodings, see
	g_filename_<to|from>_utf8()
	* objects/standard/image.c : use them.

	* lib/widgets.c : handle possible encoding difference here, too.
	Also get rid of most warnings by using const and GTK casts where 
	appropriate; one wrong cast (probably causing a crash) was found/fixed 
	by this - the remaining give a hint on finally leaking FontSelectorEntry.

	* lib/widgets.[hc] : hide _DiaFileSelector and *Class in .c. Modified
	dia_file_selector_<get|set>_file to behave like the respective Gtk 
	functions do : encoding- and const-wise ;-)

Comment 2 Lars Clausen 2004-02-17 22:37:14 UTC
Mass reassign of 0.92[-pre*] bugs to 0.92.2
Comment 3 Hans Breuer 2004-11-07 10:06:07 UTC
*** Bug 151639 has been marked as a duplicate of this bug. ***
Comment 4 Hans Breuer 2004-11-07 10:12:00 UTC
Adapt the subject. Note: allthought this got reported twice for windoze AFAIK
this is more Gtk/Glib cross platform issue. Some effort to loosen the
restrictions is underway for Glib 2.6. 
For now please ensure your locale setting does match the encoding used on disk.
Comment 5 Hans Breuer 2006-04-04 21:10:22 UTC
*** Bug 337148 has been marked as a duplicate of this bug. ***
Comment 6 Hans Breuer 2006-05-13 21:22:42 UTC
*** Bug 339283 has been marked as a duplicate of this bug. ***
Comment 7 Hans Breuer 2006-10-28 08:58:34 UTC
*** Bug 366121 has been marked as a duplicate of this bug. ***
Comment 8 Hans Breuer 2007-01-03 13:34:03 UTC
*** Bug 348654 has been marked as a duplicate of this bug. ***
Comment 9 Hans Breuer 2007-03-17 10:11:29 UTC
*** Bug 417451 has been marked as a duplicate of this bug. ***
Comment 10 Hans Breuer 2007-03-18 17:52:07 UTC
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.
	
Comment 11 Lars Clausen 2007-09-28 18:45:56 UTC
*** Bug 481328 has been marked as a duplicate of this bug. ***
Comment 12 Hans Breuer 2007-10-03 18:38:35 UTC
*** Bug 482981 has been marked as a duplicate of this bug. ***