Javadoc error: unmappable character for encoding ASCII
Solution 1
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
).
Solution 2
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.
Related videos on Youtube
Spoofy
Updated on June 05, 2022Comments
-
Spoofy almost 2 years
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:
- Right-clicked on the project
- Choosed Resource
- Change to UTF-8
- Restarted Eclipse
- 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?
-
user3076105 about 3 yearsI got the same error from the java compiler and found that
javac -encoding utf-8 ...
works in that case, too.