-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grass_script.bat always fails if USERNAME contains MBCS #18019
Comments
Author Name: Tarot Osuji (@tarot231) I'm sorry, the report explains 2 bugs. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Médéric RIBREUX (Médéric RIBREUX) Hello, I am working on it (only made with GRASS7)... I have found a way to deal with grass7_script.bat. The main problem was a MS-Windows Shell (cmd.exe) problem. MS-Windows shell can only execute scripts (.bat files) with the same encoding than the shell encoding. This encoding follows the configured language on the computer, so I had to find a way to get this encoding to build grass7_script.bat with the correct encoding. Finally, I succeeded in launching a GRASS7 algorithm under an account with a username which has french accents. I have made the fix tests on MS-Windows XP for the moment (the only VM with MS I have). I will try it on MS-Windows 7 next week and make a Pull-Request for this soon (so you can test it). Stay tuned !
|
Author Name: Médéric RIBREUX (Médéric RIBREUX) Hello, the "PR is published":#2882... Can you make some tests ? |
Author Name: Médéric RIBREUX (Médéric RIBREUX) Hello and thank for your report, logs are in the Log Messages Panel (and I need them to go further) ! I really need the logs to know where the error is. Could you paste them here (or send an attached file) ? The pull request is working on a french version of MS Windows but I suspected that there could be other problems on different language versions of MS Windows. I have also worked on another workaround (which should work but relies on short filenames (which is bad !)) so we have another solution if the first is not working for you.
|
Author Name: Tarot Osuji (@tarot231) Hi, attached error log screen.
|
Author Name: Médéric RIBREUX (Médéric RIBREUX) Hello, I can see that you are using GRASS6. The fix I have made is only for GRASS7 (but I can backport it for GRASS6 once we will be sure it is really fixed). Here is a quick test procedure:
Thanks for your test...
|
Author Name: Tarot Osuji (@tarot231) Hi, thanks for teaching method to activate GRASS 7. I tried but unfortunately error occured. I installed QGIS 2.14 with OSGeo4W. And yesterday, I download the trunk from github. Thank you.
|
Author Name: Médéric RIBREUX (Médéric RIBREUX) Ok, I suspect this gonna be painful because I don't have the same problems than you and I can't reproduce them. You will be my eyes for remote testing... Can you try with the attached Grass7Utils.py and "mail me":mailto:mederic.ribreux@medspx.fr the results (to not pollute the bug tracker) ? Thanks !
|
Author Name: Tarot Osuji (@tarot231) About a month ago, I sent the following messege:Hi, I exchanged Grass7Utils.py and run, DEBUG log only show So I added QgsMessageLog.logMessage() to find where is the problem. I attached the screen. 'cp932' is Japanese subset of mbcs. Thanks
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) End of life notice: QGIS 2.18 LTR
|
Author Name: Tarot Osuji (@tarot231)
Original Redmine Issue: 9425
Affected QGIS version: master
Redmine category:processing/grass
Assignee: Victor Olaya
On Windows, if USERNAME contains Multi Byte Character Set, processing with GRASS (grass_script.bat) always fails.
The reason is following bug:
#17591
Attached patch solves the problem from "Always failing" to "Available, if all value contains no MBCS". Other backends have same problem.
I think the fundamental solution is convert string value to temporal safe ascii value before create batch.
Unfortunately many tools don't consider MBCS. However if such option exists, many processing tools are able to use more widely.
Related issue(s): #20770 (relates), #24160 (relates)
Redmine related issue(s): 12657, 16250
The text was updated successfully, but these errors were encountered: