This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200134

Summary: Javadoc ant task for RCP module doesn't set charset
Product: apisupport Reporter: sixth
Component: HarnessAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: normal Keywords: I18N, SIMPLEFIX
Priority: P3    
Version: 7.0.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description sixth 2011-07-14 11:13:59 UTC
When one generates Javadoc documentation for an RCP module the encoding charset is not set in the generated HTML file. Because of this HTML text appears badly if other settings in the browser is not applied (e.g. Automatic encoding recognition).

There is a workaround: javadoc Ant target must be overwritten.

Proposed solution: 'charset' attibute should be set at 'javadoc' element of 'javadoc' target in build.xml at harness.

Instead of this:

<target name="javadoc" depends="build-init,-javadoc-init">
  <mkdir dir="${netbeans.javadoc.dir}/${code.name.base.dashes}"/>
  <javadoc destdir="${netbeans.javadoc.dir}/${code.name.base.dashes}" 
           packagenames="${module.javadoc.packages}"
           source="${javac.source}" 
           windowtitle="${javadoc.title}"
           encoding="UTF-8">
    <classpath refid="cp"/>
    <classpath path="${module.run.classpath}"/><!-- XXX #157320 -->
    <sourcepath location="${src.dir}"/>
    <doctitle>${javadoc.title}</doctitle>
    <header>${javadoc.header}</header>
  </javadoc>
</target>

this should be written:

<target name="javadoc" depends="build-init,-javadoc-init">
  <mkdir dir="${netbeans.javadoc.dir}/${code.name.base.dashes}"/>
  <javadoc destdir="${netbeans.javadoc.dir}/${code.name.base.dashes}" 
           packagenames="${module.javadoc.packages}"
           source="${javac.source}" 
           windowtitle="${javadoc.title}"
           encoding="UTF-8"
           charset="UTF-8">
    <classpath refid="cp"/>
    <classpath path="${module.run.classpath}"/><!-- XXX #157320 -->
    <sourcepath location="${src.dir}"/>
    <doctitle>${javadoc.title}</doctitle>
    <header>${javadoc.header}</header>
  </javadoc>
</target>
Comment 1 Tomas Danek 2011-07-14 11:43:36 UTC
harness subcomponent takes care about build.xml templates i guess..
Comment 2 Jesse Glick 2012-04-13 18:39:52 UTC
core-main #ffb163eef85b
Comment 3 Quality Engineering 2012-04-14 09:42:23 UTC
Integrated into 'main-golden', will be available in build *201204140400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ffb163eef85b
User: Jesse Glick <jglick@netbeans.org>
Log: #200134: Javadoc ant task for RCP module doesn't set charset