mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
fixed
This commit is contained in:
parent
fa39514e52
commit
c0d6765662
@ -35,14 +35,14 @@ namespace ZL {
|
|||||||
namespace Http {
|
namespace Http {
|
||||||
|
|
||||||
//////////////////////////通用///////////////////////
|
//////////////////////////通用///////////////////////
|
||||||
void UTF8ToUnicode(WCHAR* pOut, const char *pText)
|
void UTF8ToUnicode(wchar_t* pOut, const char *pText)
|
||||||
{
|
{
|
||||||
char* uchar = (char *)pOut;
|
char* uchar = (char *)pOut;
|
||||||
uchar[1] = ((pText[0] & 0x0F) << 4) + ((pText[1] >> 2) & 0x0F);
|
uchar[1] = ((pText[0] & 0x0F) << 4) + ((pText[1] >> 2) & 0x0F);
|
||||||
uchar[0] = ((pText[1] & 0x03) << 6) + (pText[2] & 0x3F);
|
uchar[0] = ((pText[1] & 0x03) << 6) + (pText[2] & 0x3F);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
void UnicodeToUTF8(char* pOut, const WCHAR* pText)
|
void UnicodeToUTF8(char* pOut, const wchar_t* pText)
|
||||||
{
|
{
|
||||||
// 注意 WCHAR高低字的顺序,低字节在前,高字节在后
|
// 注意 WCHAR高低字的顺序,低字节在前,高字节在后
|
||||||
const char* pchar = (const char *)pText;
|
const char* pchar = (const char *)pText;
|
||||||
|
Loading…
Reference in New Issue
Block a user