小编met*_*fex的帖子

如何将Unicode路径转换为ac字符串?

如何从Unicode路径名(LPWSTR)转换为ASCII等效?被调用的库只能理解c字符串.

编辑:好的,我拿了GetShortPathName和WideCharToMultiByte建议并创建了那段代码,我用路径中包含Unicode字符的一些文件夹测试了它,它运行得很完美:

wlength = GetShortPathNameW(cpy,0,0);
LPWSTR shortp = (LPWSTR)calloc(wlength,sizeof(WCHAR));
GetShortPathNameW(cpy,shortp,wlength);
clength = WideCharToMultiByte(CP_OEMCP, WC_NO_BEST_FIT_CHARS, shortp, wlength, 0, 0, 0, 0);
LPSTR cpath = (LPSTR)calloc(clength,sizeof(CHAR));
WideCharToMultiByte(CP_OEMCP, WC_NO_BEST_FIT_CHARS, shortp, wlength, cpath, clength, 0, 0);
Run Code Online (Sandbox Code Playgroud)

c winapi

9
推荐指数
1
解决办法
3513
查看次数

MySQL,在分组前排序

如果我发出这样的查询:

select c1, c2, c3
from table
group by c1;
Run Code Online (Sandbox Code Playgroud)

我得到了c1的明显结果,但我如何在组之前对它进行排序(例如c2降序)?

mysql sql

2
推荐指数
1
解决办法
4048
查看次数

标签 统计

c ×1

mysql ×1

sql ×1

winapi ×1