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 - Javadoc ant task for RCP module doesn't set charset
Summary: Javadoc ant task for RCP module doesn't set charset
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: I18N, SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2011-07-14 11:13 UTC by sixth
Modified: 2012-04-14 09:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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