In Mint Linux, "Start"-"Control Panel"-"System Setup Panel" menu, open the System setup interface, click Keyboard, open the keyboard configuration interface, click the Keyboard Shortcuts tab, and click Custom Shortcut to open the dialog box to add a shortcut key. Select the execution file with the Chinese path, such as: Download/runwps.sh in the current user directory after the selection, the results are displayed in the "Instruction" column for/home/user/%e4%b8%8b%e8%bd%bd/runwps.sh, which is due to the Chinese word download Shown in UTF8 encoding,%E4%B8%8B%E8%BD%BD, by looking at the source code in this section, the problem is found, as follows:
def onfilepicked (self, widget):
Not support Chinese in filepath.
#path = Self.file_picker.get_uri () [7:]
Support Chinese in filepath
Path = Self.file_picker.get_filename ()
Self.command_entry.set_text (PATH)
In the above code,//NOT support Chinese in filepath. #path = Self.file_picker.get_uri () [7:] is not supported in Chinese because it is acquired in the form of a URI;
Support Chinese in filepath
Path = Self.file_picker.get_filename ()
This code is able to support the Chinese path, so far, the problem is resolved; Run again will not have this problem;
Author: csdn Blog Yygydjkthh
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/