Java compiler platform file encoding problem

前端 未结 4 877
花落未央
花落未央 2020-12-03 12:13

Recently I encountered a file character encoding issue that I cannot remember ever having faced. It\'s quite common to have to be aware of character encoding of text files

4条回答
  •  情歌与酒
    2020-12-03 12:53

    I've had similar issues when using variable names that aren't ascii (Σ, σ, Δ, etc) when doing math formula. On linux, it used UTF-8 encoding while interpreting. On windows it complained about invalid names because windows uses ISO-LATIN-1. The solution was to specify the encoding in the ant script I used to compile these files.

提交回复
热议问题