Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate javadoc documentation with umlauts?

I am trying to generate Java documentation in Eclipse. The source files are UTF-8 encoded and contain some umlauts. The resulting HTML files do not specify an encoding and do not use HTML entities, so the umlauts aren't displayed correctly in any browser.

What can I do to change this?

like image 600
Kim Stebel Avatar asked Aug 23 '09 20:08

Kim Stebel


People also ask

How can you generate javadoc documentation for your code?

Step 1 − Open eclipse, select the option Project →Generate Javadoc. Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next. finish button.

How do I create an automatic javadoc?

In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file).

How do I find the generated javadoc?

Accessing the Javadoc from NetbeansSelect the desired package, class or method name, right-click and select Show Javadoc. This will launch your default web browser and navigate to the Javadoc for the selected item.


2 Answers

Modified from Eclipse javadoc in utf-8:

Project -> Generate Javadoc -> Next -> on the last page, in Extra Javadoc options write:

-encoding UTF-8 -charset UTF-8 -docencoding UTF-8 
like image 126
FeelGood Avatar answered Sep 18 '22 13:09

FeelGood


See the -charset, -encoding and -docencoding flags for the javadoc command.

  • -encoding specifies the input encoding
  • -docencoding specifies the output encoding
  • -charset makes javadoc include a meta tag with encoding info
like image 27
robinr Avatar answered Sep 21 '22 13:09

robinr