如何使Internet Download Manager(IDM)从命令行参数中了解unicode字符

时间:2015-04-08 18:26:04

标签: vb.net

我有一个vb.net程序,它通过API发送请求将文件添加到IDM队列。一切正常,除非我的文件名包含unicode字符,IDM会将这些字符作为?符号。我想知道如何正确调用API,以便IDM能够正常使用unicode字符。

我的代码是:

Dim r As RegistryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\DownloadManager")
Dim fileName as string = "unicode-únìcodeỵư"
Dim p As New Process()
p.StartInfo.FileName = r.GetValue("ExePath")
p.StartInfo.Arguments = "/d """+downloadLink+""" /a /n /p ""E:\\"" /f """ + fileName + """"
p.Start()

1 个答案:

答案 0 :(得分:0)

只需声明一个函数来加密到Base64编码的URL(文件名,下载链接)然后使用函数返回:

p.StartInfo.Arguments = "/d """+downloadLink+""" /a /n /p ""E:\\"" /f """ + fileName + """"
相关问题