Right-click Sublime Text 3 - > Open in Browser to open the file contained in the folder with the Japanese name.
Currently, when I try to open a file contained in a folder containing Japanese names,
File "open_in_browser in/Applications/Sublime Text.app/Contents/MacOS/Packages/Default.sublime-package", line 7, in run
File "./webbrowser.py", line 70, inopen_new_tab
File "./webbrowser.py", line 62, in open
File "./webbrowser.py", line 635, in open
UnicodeEncodeError: 'ascii' codec can't encode characters in position 45-46: original not in range (128)
appears on the console and does not appear in the browser.
If the file path consists of all half-width alphanumeric characters, open it in the default browser with Open in Browser without any problems.
How can I open the files contained in the folder containing the Japanese name in Open in Browser?
If anyone knows the solution, please let me know.
I'm sorry if I'm wrong.
Locate webbrowser.py in the folder containing Sublime Text and look for line 635 .
The function def open(self, url, something...)
is declared on top of it, so just below it
url=url.encode("utf-8")
I think it will be fixed by adding .
バックアップPlease play with me after you back up.
© 2024 OneMinuteCode. All rights reserved.