You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: shell.openExternal can't open a windows directory which contains chinese charactors #31347
i get the same problem, and use child_process.execFileSync can work
("electron": "13.1.7")
Excetly, but looking forward to electron official support. Time to turn on the folder with explorer.exe to spend more than 3 seconds, and need manual support cross-platform.
Having the same problem with common Swedish characters å, ä ö etc. in file names or paths. Made a BIG jump from electron version 1.7.8 where it worked.
maybe it's your encoding error? your js file is UTF-8 encoding , chinese windows system is ANSI, you could chang your file name to gbk to fix this problem
var iconv = require("iconv-lite"); var str='D:/测试'; var rawStr = iconv.encode(str, 'gbk').toString('binary'); shell.openExternal(rawStr )
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
Activity
noobakong commentedon Oct 9, 2021
i get the same problem, and use child_process.execFileSync can work
("electron": "13.1.7")
hayword-wang commentedon Oct 11, 2021
Excetly, but looking forward to electron official support. Time to turn on the folder with explorer.exe to spend more than 3 seconds, and need manual support cross-platform.
FarbrorGarbo commentedon Oct 22, 2021
Having the same problem with common Swedish characters å, ä ö etc. in file names or paths. Made a BIG jump from electron version 1.7.8 where it worked.
terry2010 commentedon Jan 24, 2022
maybe it's your encoding error? your js file is UTF-8 encoding , chinese windows system is ANSI, you could chang your file name to gbk to fix this problem
var iconv = require("iconv-lite"); var str='D:/测试'; var rawStr = iconv.encode(str, 'gbk').toString('binary'); shell.openExternal(rawStr )xxxace commentedon Sep 6, 2022
hi! i do the same things as your reply but it don't works
rawStr is D:/²âÊÔ
electron version: 20.0.2
terry2010 commentedon Sep 6, 2022
there is many character encodings could show chinese charact, eg. gbk , big5 &etc , some psychos even use windows-31J
so.maybe you should try more encoding
github-actions commentedon Jan 10, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
wh201906 commentedon Jan 28, 2023
Even the encoded url doesn't work.
For example, if I type

file:///E:/%E6%B5%8B%E8%AF%95/test.txtin the address bar of Firefox then hit Enter, it can load the file.but when I run

require('electron').shell.openExternal("file:///E:/%E6%B5%8B%E8%AF%95/test.txt"), it reports a errorgithub-actions commentedon Apr 30, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
5 remaining items
electron-issue-triage commentedon Oct 31, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
wh201906 commentedon Oct 31, 2023
bump
electron-issue-triage commentedon Jan 31, 2024
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
wh201906 commentedon Jan 31, 2024
bump
electron-issue-triage commentedon May 1, 2024
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
electron-issue-triage commentedon Jun 1, 2024
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
Use the more specific shell.openPath() on Windows (#10040)
Use the more specific shell.openPath() on Windows (#10040)