[Github-comments] [geany/geany] Windows: Convert working directory to locale encoding before spawning commands (#1095)

Colomban Wendling notifications at xxxxx
Tue Jun 28 17:50:20 UTC 2016


> Agreed. Unfortunately, a locale-encoded directory won't work here. For some reason, there is a difference with cmd.exe. On my system, the system locale is Windows-1252 but cmd.exe uses CP850. So if I would encode the directory into the system locale, cmd.exe won't accept it.
But if I convert the whole script content into the system codepage, it works fine. This is what I did in a95f174 to get rid of the ugly `chcp` thing. So we also convert the program/script filename which is to be executed, as it is affected in the same way, as mentioned above.
And as in the changes mentioned above for spawn.c, here the codepage conversion is also only performed if the input string is valid UTF-8.

Okay, that sounds better indeed than temporarily changing the codepage -- and if we needed to change it anyway, wouldn't it be better for us to change it for the whole script.
Anyway yeah, converting the script looks like a good idea -- although it might not be possible with some CPs, and if the console has a different one than the system, it might actually happen :S

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1095#issuecomment-229127855
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160628/9549fa54/attachment.html>


More information about the Github-comments mailing list