开发者

Can not open file when file's name is unicode character [duplicate]

开发者 https://www.devze.com 2023-04-01 19:57 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: C#: System.Diagnostics.Process.Start("Explorer.exe", @"/select" + FilePath). Can not open f
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

C#: System.Diagnostics.Process.Start("Explorer.exe", @"/select" + FilePath). Can not open file when file's name i开发者_JAVA百科s unicode character

I want to open file's location with window Explorer. I am using C# with code

System.Diagnostics.Process.Start("Explorer.exe", @"/select," + FilePath)

it works well with simple English character, but it could not open the file's location if the file's name is Unicode character (Thia language).

Anyone could help please?


Unfortunately, command line arguments get flattened down to the current ANSI code page and back to Unicode in too many contexts. You could try manually invoking CreateProcess but there's no guarantee that will work.

0

精彩评论

暂无评论...
验证码 换一张
取 消