Reputation: 651
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:
This results in the following error:
error: unmappable character for encoding ASCII
Is there something else i can do to solve this problem?
Upvotes: 17
Views: 16016
Reputation: 918
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.
Upvotes: 2
Reputation: 5618
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
).
Upvotes: 23