Geany 2.0 has been working great until just now. When I use the Build menu, or manually use the built-in terminal, to run `make`, I get the following type errors: ` AuthorView.java:120: error: unmappable character for encoding ASCII JRadioButtonMenuItem spanishMenuItem = new JRadioButtonMenuItem("Espa??ol"); ` When I open my own terminal, the Makefile runs fine and I get my artifacts as expected. Geany recognizes the file as UTF-8 and I do have the `ñ` in there as it should be.
Could some kind soul tell me what I managed to break?
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.
Sorry. I should have mentioned I'm on Mac. I did, however, try launching Geany from the CLI, but I was met with the same fate.
This is just really strange as Geany has been working fine for years now on the same files.
Transferred to mac repo, they can send back if its not specific.
Damn, can't seem to transfer, @techee maybe geany-osx needs to have discussions enabled or something
@Syntonica I just remembered (well I don't use Macs) that there is a special wrapper executable for OSX that reads stuff like locale and theme and so on from a `geany_mac.conf` file, maybe you had modified that and it was overwritten when the new version was installed?
That was messed up! I was monkeying with alternative keyboard layouts earlier and it somehow corrupted my Language nd Region settings. I didn't think Geany would be so fussy since everything is set to use UTF-8.
Thank you kindly!
I may just go into the Mac config file and hard-set the locale.
Well in your case its not Geany, its Java. My guess is java decides what the file encoding is from the environment it inherits from Geany when Geany runs the build command, which is the environment Geany inherited when it was started by the wrapper, which is what was set in the conf file.
There is no other way of passing the information of what the file encoding is to Java AFAIK (unless there is a command line option you can add), so the encoding of the file that Geany edits is not visible to Java.
There is no other way of passing the information of what the file encoding is to Java AFAIK (unless there is a command line option you can add)
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
This resolved [a similar issue][0] for a Windows user, *mutatis mutandis*.
JDK toolchain binaries also accept `-Dfile.encoding` as [a command line switch][1].
[0]: https://github.com/geany/geany-plugins/issues/1262 [1]: https://docs.oracle.com/en/java/javase/20/intl/supported-encodings.html#GUID...
@rdipardo thanks, @Syntonica could add that to the command in the makefile maybe.
github-comments@lists.geany.org