As I'm not a javaist I don't know how Java decides the file encoding, but if its locale (GRRRRR, really BAD idea) maybe its different in Geany to in a terminal. This can happen if Geany is started from a system menu that does not run a shell to import your `.bashrc` `.profile` or wherever else you set locale. But obviously in a terminal its in a shell all those have been properly run and the makefile works.