Question

Im trying to create a Javadoc but i can't.

I have written my comments in swedish så they content charachters as å,ä,ö. This is giving me over 248 erros.

Is there a way to change the encoding for the whole Project?

I have tried:

  1. Right-clicked on the project
  2. Choosed Resource
  3. Change to UTF-8
  4. Restarted Eclipse
  5. Create new Javadoc

This results in the following error:

error: unmappable character for encoding ASCII

Is there something else i can do to solve this problem?

Was it helpful?

Solution

Specifying UTF-8 as your resource encoding is a good thing to do, but you may also perform the following:

If you generate your Javadoc using javadoc binary, you may check its -encoding parameter:

javadoc: 
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
...
-encoding <name>          Source file encoding name

Using Eclipse, you may specify this option in field "Extra Javadoc options (...):" in last Wizard step (example: -encoding UTF-8).

OTHER TIPS

I know it's old question, but maybe it would be helpful for someone. I want to add something to Xav's answer (I cannot add comments so I write answer):

Javadoc gives you following description (javadoc -help):

-encoding <name>    Source file encoding name
-charset <charset>  Charset for cross-platform viewing of generated documentation

"-encoding" parameter indicates how to read characters. You can also use "-charset" option to making your HTML documentation more readable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top