Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problems with non-ascii paths in FileDialog in SWT GTK(open() returns null, if the path contains umlauts)
Problems with non-ascii paths in FileDialog in SWT GTK [message #521584] Thu, 18 March 2010 08:20 Go to next message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
When I use org.eclipse.swt.widgets.FileDialog to choose a file in a path that contains non-ascii characters (like ä, ö, ü), the open() method just returns null instead of the path.

Stepping into the code, I found that the reason is in method computeResultChooserDialog(): the call to OS.g_filename_to_utf8 returns null (Line 152 in the FileDialog contained in org.eclipse.swt.gtk.linux.x86_64_3.5.2v3557f.jar).

My system is Debian Squeeze for x86_64 with Kernel 2.6.32 and GTK 2.18.6. Eclipse and SWT are of version 3.5.2. I am not sure, whether this is an SWT or a GTK problem. I checked, that the problem does not exist in Windows 32-bit.

Is this a known issue? I didn't find anything in newsgroups or bug reports. Am I missing something, an option I should set, for example?
Re: Problems with non-ascii paths in FileDialog in SWT GTK [message #521829 is a reply to message #521584] Thu, 18 March 2010 20:03 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

On non-Windows OSs g_filename_to_utf8() is dependent on the locale you're
running with. I would guess that your locale is not one that supports this
character (for instance a UTF-8 locale should be good, the C locale should
not). Does this seem to be the problem you're seeing?

Grant


"Roland Brand" <roland.brand@ergon.ch> wrote in message
news:hnsnob$do2$1@build.eclipse.org...
> When I use org.eclipse.swt.widgets.FileDialog to choose a file in a path
that contains non-ascii characters (like
Re: Problems with non-ascii paths in FileDialog in SWT GTK [message #521886 is a reply to message #521829] Fri, 19 March 2010 07:46 Go to previous messageGo to next message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
Hi Grant

My locale is set to ISO-8859-1, which supports those characters. I also know that handling such path names worked in an earlier version of SWT and/or GTK.

Roland
Re: Problems with non-ascii paths in FileDialog in SWT GTK [message #522478 is a reply to message #521886] Mon, 22 March 2010 18:04 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Perhaps it used to work if you were using a gtk version < 2.4.10, because
the native file chooser that swt uses changes according to this. It's
probably a bug in swt, so I would suggest logging a report with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT ,
and specify the locale that you're using so that whoever investigates it
will not assume the same problem that I did.

Grant


"Roland Brand" <roland.brand@ergon.ch> wrote in message
news:hnva5f$4ic$1@build.eclipse.org...
> Hi Grant
>
> My locale is set to ISO-8859-1, which supports those characters. I also
know that handling such path names worked in an earlier version of SWT
and/or GTK.
>
> Roland
Re: Problems with non-ascii paths in FileDialog in SWT GTK [message #525868 is a reply to message #522478] Thu, 08 April 2010 06:03 Go to previous message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
I just filed Bug #308437 for this issue.

Thanks for your help, Grant!
Previous Topic:Boolean Editor Display Problem in Suse Linux
Next Topic:CTabFolderRenderer can't be usefully subclassed
Goto Forum:
  


Current Time: Sat Dec 07 14:04:38 GMT 2024

Powered by FUDForum. Page generated in 0.03593 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top