JDK-4767128 : diagnose encoding errors in Java source files
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2002-10-23
  • Updated: 2017-05-16
  • Resolved: 2003-08-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
When a Java compiler encounters byte sequences that cannot be valid in the
encoding being used to process the file, it should give an error.
Currently the compiler silently transforms these characters into \ufffd.

###@###.### 2002-10-22

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b14
14-06-2004

PUBLIC COMMENTS The compiler now gives warning messages for encoding errors. In previous versions of javac, byte sequences appearing in the input file that could not be understood in the current character encoding were silently translated into \ufffd characters. The compiler now emits a warning when this occurs. This warning may appear if your source file has characters from the iso8859-1 character set, but you rely on your platform's default character set. On many platforms, the default file encoding is ASCII. If that is the case, you can fix the problem by specifying -encoding iso8859-1 on the compiler's command line.
10-06-2004

EVALUATION It appears that the APIs do in fact allow one to catch encoding errors. ###@###.### 2002-10-23
23-10-2002