• 2024-08-11字符集与字符编码
    文章目录ANSI多字节字符集Unicode字符集Windows平台的字符转换L指令_T()宏MFC中CStringGB2312与UTF-8的转换ANSI多字节字符集最初,Internet上只有一种字符集——ANSI(AmericanNationalStandardInstitute)的ASCII(AmericanStandardCodeforInformationInterchang
  • 2024-08-01从 UTF-8 编码到 GBK 编码的转换,解决中文在日志里显示乱码
    从UTF-8编码到GBK编码的转换,通过中间步骤先将UTF-8转换为宽字符,再将宽字符转换为GBK。std::stringUtf8ToGbk(conststd::string&utf8){intlen=MultiByteToWideChar(CP_UTF8,0,utf8.c_str(),-1,NULL,0);std::unique_ptr<wchar_t[]>wstr(newwchar_t
  • 2024-06-08c++各种字符串互转(char*、wchar_t*、CString、string、wstring、LPCWSTR)
    1//字符串转换宏2//简写意思:C:const,T:Cstring,W:wstring,A:string34//Cstring转wchar_t*:5wchar_t*p=cstr.AllocSysString()67//Cstring转string:str=CT2A(cstr)8#defineCSTR2STR(cstr)CT2A(cstr)910//Cstring转wstr
  • 2023-09-22c++ chat* 转 wchar*
    wchar_t*charToWchar(constchar*src){size_tsize=strlen(src)+1;wchar_t*dest=newwchar_t[size];size_toutSize;mbstowcs_s(&outSize,dest,size,src,size-1);returndest;} stringwstr2str(constwstring&wstr)
  • 2023-07-04windows上,gbk utf8相互转换
    #include<locale>#include<codecvt>inlinestd::stringutf8_to_gbk(conststd::string&str){std::wstring_convert<std::codecvt_utf8<wchar_t>>conv;std::wstringtmp_wstr=conv.from_bytes(str);//GBKlocalenamei
  • 2023-01-17c++ UTF8-GBK互转
    inlinestd::stringutf8_to_gbk(conststd::string&str){std::wstring_convert<std::codecvt_utf8<wchar_t>>conv;std::wstringtmp_wstr=conv.from_byte
  • 2022-11-27Windows RPC 探测出网(MS-RPRN协议)
    WindowsRPC探测出网(MS-RPRN协议)参考链接https://github.com/Rvn0xsy/SchtaskCreatorhttps://payloads.online/archivers/2022-03-04/1/通过WindowsRPC批量寻找
  • 2022-11-22Windows RPC 远程过程调用 初探
    WindowsRPC远程过程调用初探参考资料https://bbs.pediy.com/thread-262291.htmWindowsRPC远程过程调用---初理解RPC简单理解RPC(Remoteprocedurecall远程过
  • 2022-10-11nlohmann / json 使用
       下载地址   https://github.com/nlohmann/json/tree/develop/single_include/nlohmann/json.hpp  引入工程  json.hpp是源文件包含了所有的函数,引入