Bug 34325 - [encoding] Unreadable file when compiling and displaying
Summary: [encoding] Unreadable file when compiling and displaying
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 60294 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-10 09:59 EST by Pascal Rapicault CLA
Modified: 2004-05-06 02:57 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2003-03-10 09:59:25 EST
I imported the source of org.eclipse.jdt.core using the PDE, but the source
refused to compile.
I got the following message:
  The project was not built since the source file
/org.eclipse.jdt.core/src-jdtcore/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
could not be read.

When I tried to open the file the editor displayed the following message:
   The file is unreadable using the "UTF-8" character encoding.
Comment 1 Pascal Rapicault CLA 2003-03-10 10:07:46 EST
Got the same pb with file 
org/eclipse/jdt/core/compiler/InvalidInputException.java
Comment 2 Jerome Lanneluc CLA 2003-03-10 10:56:54 EST
How did you import the source? Using PDE import? CVS check out? Unzip?
Comment 3 Pascal Rapicault CLA 2003-03-10 11:01:02 EST
Sorry, PDE Import.
Comment 4 Jerome Lanneluc CLA 2003-03-10 11:33:37 EST
Olivier, please see with Pascal what could be wrong.
Comment 5 Olivier Thomann CLA 2003-03-10 11:37:06 EST
The problem is that the editor is expecting the source code to be saved in UTF8 
encoding. This is not the case. This is a general issue with Eclipse and 
encoding and it is not related to the compiler. If you set the encoding of the 
workspace to be Cp1252, it will work again.
Comment 6 Olivier Thomann CLA 2003-03-10 12:43:53 EST
Move to platform/Core. The encoding of the source file should be preserved. 
Changing the default encoding to UTF8 should not affect existing files which 
use a different encoding.
Comment 7 John Arthorne CLA 2003-03-18 12:15:02 EST
Forwarding to platform-text.  The core just reads and writes bytes, we never
interpret encoding (we don't even care if contents are text).
Comment 8 Dani Megert CLA 2003-07-16 08:51:10 EDT
Pascal did you change the default encoding?
Comment 9 Rafael Chaves CLA 2004-04-28 16:30:45 EDT
*** Bug 60294 has been marked as a duplicate of this bug. ***
Comment 10 Dani Megert CLA 2004-04-29 02:56:11 EDT
I am not sure whether bug 60294 is really a dup. Text now (I20040427 and some
previous builds) uses platform support to get the file's encoding.

Moving to J Core to check whether they now also switched to the new encoding
support (I think so).
Comment 11 Philipe Mulet CLA 2004-05-04 12:54:43 EDT
Yes we did convert a while ago to new encoding story.
Frederic - pls investigate.
Comment 12 Frederic Fusier CLA 2004-05-05 13:26:23 EDT
Fixed since bug 39068.

Verified on Linux-GTK with M8 build.
Verified on Windows with I200405050200 build.