Bug 312832 - setting custom workspace encoding breaks file names with german umlauts in runtime workspace
Summary: setting custom workspace encoding breaks file names with german umlauts in ru...
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 major with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-13 15:02 EDT by Robert Wloch CLA
Modified: 2020-02-05 09:07 EST (History)
6 users (show)

See Also:


Attachments
error appears in runtime workspace using default encoding which is a custom encoding in development workspace (56.55 KB, image/png)
2010-05-13 15:02 EDT, Robert Wloch CLA
no flags Details
custom encoding in development workspace causes the error (49.41 KB, image/png)
2010-05-13 15:04 EDT, Robert Wloch CLA
no flags Details
default encoding in development workspace will never cause the error in the runtime workspace (49.81 KB, image/png)
2010-05-13 15:07 EDT, Robert Wloch CLA
no flags Details
no error in the runtime workspace when using default encoding in both workspaces (46.86 KB, image/png)
2010-05-13 15:09 EDT, Robert Wloch CLA
no flags Details
no error in the runtime workspace when using custom encoding when development workspace uses default encoding (41.89 KB, image/png)
2010-05-13 15:10 EDT, Robert Wloch CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Wloch CLA 2010-05-13 15:02:06 EDT
Created attachment 168443 [details]
error appears in runtime workspace using default encoding which is a custom encoding in development workspace

While testing some modeling plugins in a runtime workspace I discovered, that Eclipse doesn't list all files in Project and/or Package Explorer. It skips files with German umlauts (ä,ö,ü). It seems that the resource code is not even aware of these files. I checked that using workspace.findMember() in combination with a resource visitor.

This issue might also be connected to the PDE but I'm not sure about that.
Creating files with umlauts will actually create them on the file system, but the editor in Eclipse will open with a FileNotFoundException. As you can see on the screenshots, the Project Explorer is showing the file. However, as soon as I refresh the workspace it's gone but still lives on on the file system. Further refreshs will not make such files appear again.

The bug is reproducible and exists already in Eclipse 3.5. I tested it with modeling SR2 and modeling 3.6M7. I failed to reproduce it on my Windows box. So it might be connected to Linux and maybe even to Linux using utf-8 as default file encoding.

Here is a guide to reproduce it:
1) Download and unzip fresh Eclipse.

2) Start it and create a new workspace.

3) In that workspace create a general project "foo" and add a file "bäd.txt". It will always work in the development workspace.

4) Delete the file.

5) In the workspace preferences change the encoding from utf-8 to something else than that default, e.g. to iso-8859-1.

6) Create the file "bäd.txt" again and note that it's still working: I never had problems in development workspaces.

7) Delete the file.

8) Create a new run configuration for an "Eclipse Application" and launch it.

9) In the runtime workspace check the workspace encoding in the preferences: The workspace encoding is set to default which uses the encoding of the development workspace, that was set to a custom encoding in step 5).

10) Create a general project "foo" and create a file "bäd.txt" in it. The default editor will show a FileNotFoundException.

11) Delete the file. If you don't and you refresh it'll not be shown in the Project Explorer any more and you'll need to delete it outside of Eclipse.

12) Still in the runtime workspace, change the workspace encoding to whatever is the default of the development workspace. (In my case, the default of my development workspace is utf-8. So, I set "utf-8" as custom encoding in my runtime workspace.)

13) Create the file "bäd.txt" again and note that it's still NOT working.

14) Delete the file.

15) Close the runtime workspace.

16) In the development workspace change the workspace encoding back to its default.

17) Start the runtime workspace.

18) In the runtime workspace set the workspace encoding in the preferences to default which uses the encoding of the development workspace. (In my case the default is utf-8.)

19) Create the file "bäd.txt" see that it's working this time.

20) Delete the file.

21) Still in the runtime workspace, change the workspace encoding to something else. I set it to "iso-8859-1".

22) Create the file "bäd.txt" see that AGAIN it's working this time.

I suppose this does not only affect German umlauts, but any letter that is not part of the english alphabet, but I've not tested that.

This issue might also be connected to the PDE and the mechanism behind starting a runtime workspace but I'm not sure about that.
Comment 1 Robert Wloch CLA 2010-05-13 15:04:20 EDT
Created attachment 168444 [details]
custom encoding in development workspace causes the error
Comment 2 Robert Wloch CLA 2010-05-13 15:07:49 EDT
Created attachment 168445 [details]
default encoding in development workspace will never cause the error in the runtime workspace
Comment 3 Robert Wloch CLA 2010-05-13 15:09:08 EDT
Created attachment 168446 [details]
no error in the runtime workspace when using default encoding in both workspaces
Comment 4 Robert Wloch CLA 2010-05-13 15:10:41 EDT
Created attachment 168447 [details]
no error in the runtime workspace when using custom encoding when development workspace uses default encoding
Comment 5 Robert Wloch CLA 2010-05-14 05:48:34 EDT
I just checked if that error also exists on MacOS: It doesn't. So it seems to be Linux specific and might be connected to the default filename encoding being UTF-8 on Kubuntu 10.04.
Comment 6 Wolf P CLA 2012-08-30 18:04:21 EDT
im currently having this issue after updating from 3.7 to 3.8

running mac osx 10.8.1


whenever i create a file with Ä,Ö,Ü it shows up for 3 seconds in the package explorer but inside the sourceview it says file not found


when i create a file like Ü.java it actually creates a File called ?.java on my filesystem, but if i change it to Ü.java on the filesystem, it doesnt show up again in the package explorer
Comment 7 Martin Hollerweger CLA 2013-09-24 08:43:17 EDT
(In reply to Wolf P from comment #6)
> im currently having this issue after updating from 3.7 to 3.8
> 
> running mac osx 10.8.1
> 
> 
> whenever i create a file with Ä,Ö,Ü it shows up for 3 seconds in the package
> explorer but inside the sourceview it says file not found
> 
> 
> when i create a file like Ü.java it actually creates a File called ?.java on
> my filesystem, but if i change it to Ü.java on the filesystem, it doesnt
> show up again in the package explorer

same problem here, but i think i have this issue since i updated mac osx to mauntain lion (from lion) with eclipse juno and keplar
Comment 8 Burghard Britzke CLA 2013-11-08 05:10:09 EST
same on OSX 10.9 Kepler Service Release 1 Build id: 20130919-0819
Comment 9 Burghard Britzke CLA 2013-11-13 13:36:31 EST
See bug 312832 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=312832). This may be the same or a similar filename handling issue, which has raises with one of the last eclipse version.
Both have not been there in previous releases (early this year or in the last year).
Comment 10 Burghard Britzke CLA 2013-11-13 13:38:17 EST
(In reply to Burghard Britzke from comment #9)
> See bug 312832 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=312832). This
> may be the same or a similar filename handling issue, which has raises with
> one of the last eclipse version.
> Both have not been there in previous releases (early this year or in the
> last year).

pardon! Here I mean Bug 42391 (https://bugs.eclipse.org/bugs/show_bug.cgi?id= 42391).
Comment 11 Burghard Britzke CLA 2013-11-14 01:30:14 EST
pardon again! The right ID is Bug 421391
Comment 12 Burghard Britzke CLA 2013-11-26 11:19:18 EST
You Mac Guys (since comment 6)!
updating to JDK 1.7.0_45 fixes the umlaut issue for me. You must install the JDK, updating the Java environment using the Java Control Panel does not work because it does not change the symlink /usr/bin/java.

But I am not pretty sure if it has been the same error from which is told before comment #6.
Comment 13 Eclipse Genie CLA 2020-02-05 08:22:00 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 14 Paul Pazderski CLA 2020-02-05 09:07:01 EST
Still the same with 4.15M1 and Ubuntu 19.04.