开发者

Get alternative filename in windows

开发者 https://www.devze.com 2023-02-02 09:32 出处:网络
I\'m running my program on windows that will enumerate the files in a directory and pass it on to some other library that processes the files. Whil开发者_Go百科e my program does support unicode, the l

I'm running my program on windows that will enumerate the files in a directory and pass it on to some other library that processes the files. Whil开发者_Go百科e my program does support unicode, the library doesn't, so I have to convert the unicode file path and name to ANSI. That works just fine, as long as there are no unicode characters in that filename.

I know that every file and directory in windows is accessible through it's 8.3 name, but I don't know how to get that name through the windows api.


GetShortPathName()

It should be noted that shortname generation can be turned off (fsutil)

0

精彩评论

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