Can't download file to non-ascii path
Posted: Tue Jan 18, 2011 2:38 am
Win7(Simplified Chinese Version, ansi encoding = gbk/cp936) + Firefox 3.6.13 + flashgot 1.2.8
In the FlashGot destination directory dialog, I choosed a non-ascii path, then the customed downloader received a wrong path(garbled characters) via command line.
I guess the problem is the wrong conversion between different encodings.
Don't know much about Firefox plugins and javascript, and I can't find the codes which launched the customed downloader.
For windows, there are some win32 apis to created a new process, such as ShellExecute. If you are using ShellExecute, the command line arguments should be converted with ANSI encoding; if you are using ShellExecuteW, the command line should be in the format of wchar_t*, which is in fact UTF16le encoded string.
I really appreciate your reply.
In the FlashGot destination directory dialog, I choosed a non-ascii path, then the customed downloader received a wrong path(garbled characters) via command line.
I guess the problem is the wrong conversion between different encodings.
Don't know much about Firefox plugins and javascript, and I can't find the codes which launched the customed downloader.
For windows, there are some win32 apis to created a new process, such as ShellExecute. If you are using ShellExecute, the command line arguments should be converted with ANSI encoding; if you are using ShellExecuteW, the command line should be in the format of wchar_t*, which is in fact UTF16le encoded string.
I really appreciate your reply.