java replace German umlauts

后端 未结 8 793
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 06:24

I have the following problem. I am trying to replace german umlauts like ä, ö, ü in java. But it simply does not work. Her

8条回答
  •  旧巷少年郎
    2020-12-31 07:03

    Works fine when I try it, so it must be an encoding issue.

    Check your system encoding. You may want to add -encoding UTF-8 to your javac compiler command line.

          -encoding encoding
             Set the source file encoding name, such as EUC-JP and UTF-8. If -encoding is not specified, the platform default converter is used.
    

提交回复
热议问题