Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368832

Summary: Source bundles are missing file encoding information
Product: [Eclipse Project] PDE Reporter: Olaf Titz <olaf.titz>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olaf Titz CLA 2012-01-17 10:16:55 EST
Build Identifier: Version: 3.6.1 Build id: M20100909-0800

The source bundles apparently have no indication about the encoding of the contained source files. This makes displaying them in a Java editor problematic.
For an example, look at the org.apache.lucene.analysis.source_1.9.1.v20100518-1140.jar file. The contained source files are in different encodings (some are US-ASCII, some are UTF16-LE with BOM, e.g. BrazilianStemmer.java). The editor apparently does some recognition tricks but no correct conversion, e.g. when opening BrazilianStemmer mostly it looks correct, but the non-ASCII characters are shown like UTF-8(!) encoded text in a CP1252 (or Latin1) editor.

To fix this, the .settings/org.eclipse.core.resources.prefs file should be included in the source bundle, and the Java editor showing the source should make use of that.


Reproducible: Always

Steps to Reproduce:
1. Set your workspace default encoding to CP1252 (not sure if this matters, but this is how mine looks like)
2. Create a plug-in project depending on org.apache.lucene.analysis.
3. Ctrl-Alt-T and open the class BrazilianStemmer.
4. Look at the method changeTerm().
This is shown in the source editor:
      if ((value.charAt(j) == 'é') ||
          (value.charAt(j) == 'ê')) {
        r= r + "e" ; continue ;
      }
where the character constants should be 'é' and 'ê'.
Comment 1 Lars Vogel CLA 2018-12-03 09:04:56 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.