JDK-4661481 : REGRESSION: -encoding option is ignored for reading java sources
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2002-04-02
  • Updated: 2014-05-05
  • Resolved: 2002-04-25
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
1.4.1 hopperFixed
Description

Name: nt126004			Date: 04/02/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)


FULL OPERATING SYSTEM VERSION :
SunOS java 5.8 Generic_108528-12 sun4u sparc SUNW,Ultra-2

ADDITIONAL OPERATING SYSTEMS :

Windows 2000, Windows 98 (Probably this bug is
platform-independent)

EXTRA RELEVANT SYSTEM CONFIGURATION :
Japanese language environments

A DESCRIPTION OF THE PROBLEM :
When -encoding option is specified to javadoc, Java source
codes can't be converted correctly. So Japanese characters
are converted to "???????".

For example, this problem occurs when you convert Java
source files encoded in Shift_JIS on Japanese Solairs EUC-JP
environment with "-encoding Shift_JIS".

Perhaps javadoc may convert Java sources in according to its
default character encoding, not an encoding specified by
"-encoding" option.

I guess this bug was included when you fixed Bug ID 4463408
from the following reasons:

1, In 1.4b, javadoc can convert java sources correctly, but
not package.html.
2, In 1.4b2, javadoc can convert package.html correctly, but
not java sources.
3, Bug ID 4463408 was fixed in 1.4b2.

REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Create a Java source file encoded in a character encoding
which isn't equal to javadoc's default character encoding.
For example, use EUC-JP on Japanese Windows platform and use
Shift_JIS on Japanese Solaris platform.
2.Run javadoc with "-encoding" and Java source's character
encoding.
3.Check the output.

EXPECTED VERSUS ACTUAL BEHAVIOR :
When "-encoding" option is specified, Javadoc should read
Java sources and package.html in according to it.

Now javadoc ignores "-encoding" option and reads Java
sources in according to its default character encoding and
produces currupted character sequences such as "??????".

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message.

This bug can be reproduced always.

CUSTOMER WORKAROUND :
Convert Java sources to the default character encoding use
in your environment.

Release Regression From : merlin-beta
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 144520) 
======================================================================

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

EVALUATION Would be important to fix for hopper ###@###.### 2002-04-02 This bug has been fixed. Location of fix: com.sun.tools.javadoc.Start Regression test at: test/com/sun/javadoc/testEncoding/testEncodingWrapper.sh ###@###.### 2002-04-22
22-04-2002

PUBLIC COMMENTS This bug has been fixed. Javadoc now correctly passes the encoding value to the source file parser. ###@###.### 2002-04-22
22-04-2002