Closed GoogleCodeExporter closed 9 years ago
I forgot to mention that the correct file name is "Točka.java". Also, the
scala sources compile fine, and none of the Java sources compile at all
(obviously).
Original comment by seriousworm
on 8 Apr 2011 at 4:55
[deleted comment]
It would help if you could show how it works using command line javac,
including all encoding-related settings, environment variables, and system
properties you had to configure to make it work. From what I can tell,
'-encoding' only affects the contents of the source file and not the filename
encoding.
Original comment by dmhar...@gmail.com
on 4 May 2011 at 12:58
[deleted comment]
Sure: javac command line from cmd.exe (Windows 7 x64):
javac -encoding utf8 -classpath
.;lib/lwjgl/lwjgl.jar;lib/lwjgl/lwjgl_test.jar;lib/lwjgl/lwjgl_util.jar;lib/lwjg
l/jinput.jar -sourcepath src/ src/{SOURCEPATH}/AMainClass.java
AMainClass.java references Točka2D(.java) so obviously javac compiles that too
(and indeed, I verified and there it is, Točka2D.class in the source
directory, since I compiled without specifying any directory for output
classes). The compile proceeds with 0 errors.
I didn't have to configure anything, I just opened cmd.exe and called javac
(the path has c:\program files (x86)\java\jdk7\bin in it). This is the Java 7
SDK.
Original comment by seriousworm
on 4 May 2011 at 8:26
That doesn't specify Točka2D on the command line, though. sbt is going to
pass the name of the source file explicitly to javac. This is what needs to
work:
javac <options> Točka2D.java
for some <options>.
Original comment by dmhar...@gmail.com
on 4 May 2011 at 9:33
If I specify that line, it compiles successfully. However, if I change the
filename to an invalid one with the same UTF-8 characters, the output is
garbled:
javac (options) invalidPath\Točka2D.java
javac: file not found: invalidPath\ToŔka2D.java
Not sure if that is relevant.
Original comment by seriousworm
on 4 May 2011 at 9:57
This works for me:
override def javaCompileOptions = javaCompileOptions("-encoding", "utf8")
Original comment by dmhar...@gmail.com
on 4 May 2011 at 10:53
Actually I've already specified that, see my initial post above. My line is:
override def javaCompileOptions = super.javaCompileOptions ++
javaCompileOptions("-source", "1.6") ++ javaCompileOptions("-encoding", "utf8")
(unless that line is somehow invalid? But shouldn't sbt throw an error then?)
I've also tried running sbt from commandline (cmd.exe), the same one where
invoking javac directly on the target file works. Same error.
Original comment by seriousworm
on 5 May 2011 at 5:02
Sorry, my point was that it isn't a bug in sbt but it is likely a configuration
problem. Perhaps you have not set -Dfile.encoding=utf8. In any case, please
use the mailing list for further discussion.
Original comment by dmhar...@gmail.com
on 12 May 2011 at 3:09
Original issue reported on code.google.com by
seriousworm
on 8 Apr 2011 at 4:53