Skip to content

Commit 4662b33

Browse files
committed
fixed:does not support chinese url
1 parent 868e129 commit 4662b33

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,18 @@ BOOL CAPIHelp_Api::APIHelp_Api_UrlParse(TCHAR*** ppptszList, int nListCount, TCH
332332

333333
if (0 == _tcsnicmp(lpszHDRFile, tszKey, _tcslen(lpszHDRFile)))
334334
{
335+
//编码格式是utf8,需要转为ansi
336+
#ifdef _MSC_BUILD
337+
TCHAR tszFileName[MAX_PATH];
338+
memset(tszFileName, '\0', MAX_PATH);
339+
340+
OPenSsl_Codec_UrlDeCodec(tszValue, _tcslen(tszValue), tszFileName);
341+
342+
int nLen = _tcslen(tszFileName);
343+
BaseLib_OperatorCharset_UTFToAnsi(tszFileName, ptszFileName, &nLen);
344+
#else
335345
OPenSsl_Codec_UrlDeCodec(tszValue, _tcslen(tszValue), ptszFileName);
346+
#endif
336347
}
337348
else if (0 == _tcsnicmp(lpszHDRKey, tszKey, _tcslen(lpszHDRKey)))
338349
{

0 commit comments

Comments
 (0)