I use macOS High Sierra (10.13.2) and Geany 1.32. I have configured Geany to use the French l10n by creating an empty file ``~/.config/geany/use_locale``. The Geany interface is now in French. Great.
My problem is that in Geany LANG is defined as "fr" and LC_ALL is defined as "" (nothing). I can see that by executing in the Geany Terminal window: ``` [rousseau:~] $ echo $LANG fr [rousseau:~] $ echo $LC_ALL
```
I have configured the lint menu to do: ``pep8 --max-line-length=80 "%f"`` and in the Compilateur window I get: ``` pep8 --max-line-length=80 "dé.py" (dans le dossier : /Users/rousseau/Documents/Sources/Python) Traceback (most recent call last): File "/usr/local/bin/pep8", line 11, in <module> sys.exit(_main()) File "/usr/local/lib/python3.6/site-packages/pep8.py", line 2134, in _main report = pep8style.check_files() File "/usr/local/lib/python3.6/site-packages/pep8.py", line 1842, in check_files runner(path) File "/usr/local/lib/python3.6/site-packages/pep8.py", line 1854, in input_file return fchecker.check_all(expected=expected, line_offset=line_offset) File "/usr/local/lib/python3.6/site-packages/pep8.py", line 1619, in check_all return self.report.get_file_results() File "/usr/local/lib/python3.6/site-packages/pep8.py", line 1750, in get_file_results 'code': code, 'text': text, UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1: ordinal not in range(128) Compilation échouée. ```
If I hack ``/Applications/Geany.app/Contents/MacOS/geany`` to add the line: ``` LC_ALL=fr_FR.UTF-8 ``` Then Geany works correctly and I get the expected output: ``` pep8 --max-line-length=80 "dé.py" (dans le dossier : /Users/rousseau/Documents/Sources/Python) dé.py:30:1: E302 expected 2 blank lines, found 0 Compilation échouée. ``` The problem is caused by the accent in the source code file: ``dé.py``. If I rename the file to ``de.py`` then I do not have the problem.
I can also define LANG=fr_FR.UTF-8 instead of LC_ALL for the same result.
What is important is to add the ".UTF-8" extension.
After reading https://lwn.net/Articles/741176/ I tried to add: ``` export LC_TYPE=C.UTF-8 ``` in ``/Applications/Geany.app/Contents/MacOS/geany``, but that does not work.
An easier (at least for me) way to check I can use non-ASCII characters is to try to enter a "é" letter in the Geany terminal window: - Without my patch I get a beep and no letter displayed - With my patch I get the expected "é"
This bug should be reassigned to https://github.com/geany/geany-osx since the (bogus) launcher is https://github.com/geany/geany-osx/blob/master/launcher-gtk3.sh
@LudovicRousseau Sorry for the long delay. I had a look at the script and made this quick change:
https://github.com/geany/geany-osx/compare/lang_test
Would this fix your problem? At least for the Czech locale both LANG and LC_ALL get exported now and have the UTF-8 extension.
I confirm your patch works for me. I now have LANG set to ``fr_FR.UTF-8`` as expected.
@LudovicRousseau Thanks. I've reported this against the gtk-osx project
https://bugzilla.gnome.org/show_bug.cgi?id=793015
and will wait for a feedback to be sure it's fixed the right way.
Wow, just wow. If anyone wants an example how not to handle bug reports and communicate in open source, the above bug report on Bugzilla is a fantastic source.
Yeah, that's too bad; it's hard enough getting GTK+ usable on non-Linux platforms even without this kind of nonsense. I hope it doesn't dissuade you from supporting Geany on Macos; a lot of people appreciate your hard work!
Nah, don't worry, I'll keep maintaining the Mac port. But I'll avoid the upstream gtk-osx project as much as I can, I just hope there won't be any critical bugs to report. I also wanted to have a look at some of the bugs of GTK3 which is still worse than GTK2 for Geany but with this guy around, I'm not motivated to do any work in this respect.
I've just applied this patch:
https://github.com/geany/geany-osx/commit/ce4ac6e76aaba19d79c4412071f2f93f16...
which should fix this particular bug.
Closed #1732.
Thanks @techee. I also use gtk-osx for another project and had a very similar problem https://github.com/grisbi/grisbi/commit/6def4763cb92a1bfb71a01d9256146ee2aac....
It is problematic that gtk-osx _maintainer_ does not want to also maintain the "example" codes.
Well, to me the most problematic thing is this guy's attitude and behavior. It's totally fine to have a different opinion, we may disagree on whether the examples should be updated or not. He's the maintainer and he has the last word to decide what to merge and what not. (Considering the examples are the only starting point to create a working bundle, they should be as good as possible - my opinion. There's no documentation on what needs to be set before launching the binary and the examples are the only source of information.). He may be time constrained, he may think the right solution might require more work, he might be aware of some cases where the patch would break things, etc. which are completely legitimate reasons for not accepting or fixing bug reports.
But making an idiot from you that you dared to create a bug report (also from his responses to other bug reports I created I have a feeling I should apologise for creating them and promise I'll never do it again), accusing you of "you f**d up, fix it!" attitude which never happened (this is something I'd NEVER do) or calling others "ignorant, lazy, or deluded" is unacceptable.
github-comments@lists.geany.org