How to troubleshoot Mint Linux custom shortcuts do not support Chinese-language path problems

Source: Internet
Author: User
Tags linux

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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.