Re: [Geany-Devel] Building geany using msys2 on Windows 10

2021-09-15 Thread Enrico Tröger


On 14.09.21 15:36, Doug Henderson wrote:

On Mon, 13 Sept 2021 at 15:55, Enrico Tröger  wrote:



Doug, I'm assuming you mean the Enrico in the little Authors table at
the top of the help manual?


I guess yes because my name is broken there.


Attached is an image of what I see:

And here is the offending line from
file:///C:/Program%20Files/Geany/share/doc/geany/html/index.html:for
1.38beta1 on win10.




[...]


This tells me that at some point the UTF8 content was loaded as ISO-8859-?


Yes, because of my misconfigured Windows machine.



So looking at https://nightly.geany.org/win32/build_win32_geany.log,
the problem is clear: the build is using Python 2.7. Python2 will read


Not really.
First, the nightly builds are created in a very old setup (no MSYS2, 
old, manually installed Win32 libraries). I won't update it anymore and 
so it's stuck to its Python2.
I'm working on a replacement to cross-compile Geany with MSYS2 packages 
from a GIT clone to fully working installer binary.


Then, the mentioned nightly builds are not used for anything, they are 
just used as CI to ensure the code still compiles.
The installers I posted were created manually by me on a real Windows 
machine.




When I tried to recreate the problem on msys and cygwin for 1.31.1,
1.36, and 1.37.1 , I could not reproduce it because I have Python3
installed as the only Python on both systems. I spent more time than I
should have on this, and I think you may have found a solution
yourself.


Yes, as I said before on the other mail in the thread, it's only a 
problem with the setup of my Windows system. It's not a general issue in 
Geany.

Thanks anyway for the detailed analysis!

Regards,
Enrico
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Building geany using msys2 on Windows 10

2021-09-15 Thread Enrico Tröger

On 14.09.21 00:34, Lex Trotman wrote:

It's Python and not generally on Windows but on my box.
On my Windows box, Python detects de-DE with cp1252 charset as locale
and rst2html (which is written in Python) then seems to read the UTF-8
encoded geany.txt with cp1252 and this fails, obviously.

I didn't find a way yet to change the locale used by Python, the usual
LANG, LANGUAGE, LC_ALL and friends environment variables do not work.
It seems Python uses some Windows API to get the locale.
But it's mainly a local issue on my end, so no worries. I'll take care
to pass "--input-encoding=utf-8" to rst2html when building the docs for
the next release and after the release, I'm going to blow up my Windows
box anyways.


Locales are an evil and dangerous thing from the past!!!  Why should
non-interactive programs run differently on different machines? [stop
before I start ranting]

Ok, so its the Geany build makefile that needs to have the
specification of input encoding added so it works everywhere and no
risk of non-UTF-8 locales breaking it.


Not sure if it is necessary.
The concrete problem with the wrongly encoded characters is rather a 
configuration problem on my system, I'd say.
Anyway, generally enforcing UTF-8 on rst2html for geany.txt should be 
fine as we have full control over the file and it probably will stay 
UTF-8 encoded for the next 20 years.


Regards,
Enrico
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel