Community
Participate
Working Groups
Created attachment 237330 [details] the file selection dialog showing files with 2 byte characters in filename the wrong way on OS X 10.9, import of files failes with the error "Error opening input stream for <filename>". The 2 Byte characters in the filename are displayed as "��". Even in the file selection dialog the 2 byte characters of the filenames are displayed the wrong way. Steps to reproduce: 1.) Create a Project (may be with UTF-8 encoding) 2.) Select File->Import... -> General->File System 3.) Select a directory with files containing 2 byte characters in the filename. The 2 byte characters in the filenames are displayed es "��" 4.) Select a file with 2 byte characters in the filename and click "Finish" An error is raised "Problems occurred during import: The details section showes: "Error opening input stream for <filename>". The 2 Byte characters in the filename are displayed as "��". It is not possible to import such a file by drag and drop, too.
Created attachment 237331 [details] the error message showing 2 byte characters in a filename as ""Error opening input stream for <filename>". The 2 Byte characters in the filename are displayed as "��"
Does the file display correctly and open in the editor when using File > Open File? Could you attach a ZIP file with the file that has problems?
Created attachment 237380 [details] the file which has been tried to import. the file is opened correctly (with the external editor TextEdit) when trying to open it via File->open File... The file selection dialog here shows the correct filename.
It is also possible to create a new file with File->New->File with 2 byte UTF-8 characters in the file name. The Problem occurs if the file is 1. copied via drag and drop to another location in the same project or if it is 2. imported via drag and drop into a project or if it is 3. imported using the project wizard.
if it is copied from one location to another location in a project, no error is displayed. but the filename is changed. every 2 byte character is displayed by a question mark (?) at the target location.
(In reply to Burghard Britzke from comment #3) > Created attachment 237380 [details] > the file which has been tried to import. > > the file is opened correctly (with the external editor TextEdit) when trying > to open it via File->open File... The file selection dialog here shows the > correct filename. And it then opens in Eclipse? I suspect that you start Eclipse with a non-UTF-8 encoding. What encoding is shown on the General > Workspace preference page? Another problem could be that the font used in Eclipse cannot display/contain those characters.
(In reply to Burghard Britzke from comment #6) > And it then opens in Eclipse? no! it opens in an external editor. but it is opened from eclipse from File->Open File... In the File Selection Box the äöüß-Characters are displayed correctly. But when I try to Import the same File with File->Import... File System and browse to select the directory to import from (in this file selection box the filenames are displayed correctly), then in the resulting dialog where I can select the files... the filenames are displayed as "��". (see the both new attachments) > I suspect that you start Eclipse with a non-UTF-8 encoding. no! I am starting with UTF-8 for the whole workspace (and all Projects and Files). > What encoding is shown on the General > Workspace preference page? The preferences page shows other: UTF-8 (default for Mac OS X would be US-ASCII) > Another problem could be that the font used in Eclipse cannot display/contain those characters. If I create a File within Eclipse, the filename would be displayed correctly, until I move it per drag and drop. Then question marks substitute the two Byte Characters.
Created attachment 237442 [details] the file selection dialog while selecting the directory shows the correct filenames as "File->Open File..." does
Created attachment 237443 [details] the resulting import dialog shows the files to import from that directory with wrong characters
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).
I'm pretty sure this is a font issue. Please go to the 'Colors and Fonts' preference page and set the 'Dialog Font' to be the same as used in the OS.
(In reply to Dani Megert from comment #11) > I'm pretty sure this is a font issue. Please go to the 'Colors and Fonts' > preference page and set the 'Dialog Font' to be the same as used in the OS. The font has been the system font (Lucida Grande). I checked it and I also selected "system font" but it didn't change. I tried the import again and again the same error orrurs. I do not agree that this is a font issue because after selecting the file and try to import. it really tries to open an input stream and fails. that can not be a font issue.
It can not be repeated on Ubuntu 10.04 linux. The import works well there.
(In reply to Dani Megert from comment #11) > I'm pretty sure this is a font issue. Please go to the 'Colors and Fonts' > preference page and set the 'Dialog Font' to be the same as used in the OS. if it would be a font problem, only one "�" character would be shown. It seems that another character encoding is expected (like US-ASCII) which is the default for eclipse on os x. And so two characters are shown, because US-ASCII only knows 1 byte characters.
(In reply to Burghard Britzke from comment #12) > I do not agree that this is a font issue because after selecting the file > and try to import. it really tries to open an input stream and fails. that > can not be a font issue. Why do you say that? You can clearly verify that the font is used to display that information, while it does not apply to the OS dialog. Anyway, if you think you better know what the problem is, then that's OK with me.
Please double-check the dialog font. For a test I've started Eclipse with US-ASCII file encoding and a new workspace: files with non-ASCII names work great. If I then choose a different dialog font, they start to be wrongly displayed.
(In reply to Dani Megert from comment #15) > (In reply to Burghard Britzke from comment #12) > > I do not agree that this is a font issue because after selecting the file > > and try to import. it really tries to open an input stream and fails. that > > can not be a font issue. > > Why do you say that? You can clearly verify that the font is used to display > that information, while it does not apply to the OS dialog. Anyway, if you > think you better know what the problem is, then that's OK with me. pardon, i do not want to know it better, but rather discuss a problem, hoping to make it reproducible for that developers who know how to fix it. This includes, that perhaps I made a problematic setting on my workspace or project which produces this error. for this case I hope to get a tipp how I can fix it my self.
(In reply to Dani Megert from comment #16) > Please double-check the dialog font. For a test I've started Eclipse with > US-ASCII file encoding and a new workspace: files with non-ASCII names work > great. If I then choose a different dialog font, they start to be wrongly > displayed. I created a new Workspace with US-ASCI Character Encoding. When I create a new file with a non-ASCII name, it works well (the Characters in the Project Explorer are displayed with umlauts). But when I try to IMPORT a file with non-ASCII names I get the described error (on my Mac). I double checked the Dialog-Font and selected "Use System Font" for the dialog font twice. It does not change. I will upload a screen shot of my font settings.
Created attachment 237657 [details] Font settings for the Dialog Font on a Mac
(In reply to Burghard Britzke from comment #19) > Created attachment 237657 [details] > Font settings for the Dialog Font on a Mac Is Lucida Grande 11 the font you use on the OS? Maybe we get/detect the wrong font? Also, please try this: - Set that font to be used as the 'Text' font and then check whether the font works in the Text Editor - Try whether using another font for the 'Dialog Font' works
(In reply to Dani Megert from comment #20) > (In reply to Burghard Britzke from comment #19) > > Created attachment 237657 [details] > > Font settings for the Dialog Font on a Mac > > Is Lucida Grande 11 the font you use on the OS? Maybe we get/detect the > wrong font? Yes Lucida Grande is the font standardly used as OS font on Mac OS X. > > Also, please try this: > - Set that font to be used as the 'Text' font and then check whether the font > works in the Text Editor - I set "Lucida Grande" as font for 'Text' and opened an editor with a new file. - I type "äöüß". It is shown correctly. - If i try to save the file, it could not because of the US-ASCII settings. > - Try whether using another font for the 'Dialog Font' works - I set "Times New Roman" as 'Dialog Font'. - I tried to Import with the same result (only the font has changed) I will upload the results
Created attachment 237689 [details] the file selection dialog for selecting the directory to import from - note the font is the system font not the dialog font
Created attachment 237690 [details] after selecting the directory to import. the files to select shows the wrong filename (event in Times New Roman)
This is a very tricky bug in the Oracle JRE for Mac OS X. Workaround: http://www.eclipse.org/eclipse/development/readme_eclipse_4.3.php#I-Platform *** This bug has been marked as a duplicate of bug 397226 ***
(In reply to Markus Keller from comment #24) > This is a very tricky bug in the Oracle JRE for Mac OS X. Note: This problem has been fixed in jdk1.7.0_40 and later, so updating to a current version of Java is enough to make this work.
The Oracle Java Update for Mac OS does not fix the Symlink /usr/bin/java and so the old Java has been active, still after Updating to java 1.7_45. And so Eclipse starts with the old Java Version. After installing the actual JDK 1.7.45 (not JRE), the error is fixed. This could also affect bug 312832 - i will check/report it.