Home > Software engineering >  Consult, the problem of oracle VS2017 read Chinese garbled.
Consult, the problem of oracle VS2017 read Chinese garbled.

Time:09-20

Oracle code format is AL32UTF8, vs2017 read parts:
 
_variant_t n=m_pRs - & gt; GetCollect ((_variant_t) strCol);

If (n.v t==VT_NULL | | n.v t==VT_EMPTY)
continue;

If (n.v t & amp; VT_ARRAY)
{
COleSafeArray oleAry (n);
Void * pData;
OleAry. AccessData (& amp; PData);
Int nSize=oleAry. GetOneDimSize ();

OleAry. UnaccessData ();
}
Else if (n.v t & amp; VT_DATE)
{
Cstrings strVal=COleDateTime (n). The Format ();
MapItem. SetAt (strCol, strVal);
}
Else if (n.v t & amp; VT_BSTR)
{
//read strVal here is the code
Cstrings strVal=n.b strVal;
//thought can make utf8 into gb form, after conversion, TMP or gibberish,,
CStringA TMP=UTF8ToGB (_com_util: : ConvertBSTRToString (n.b strVal));
}


The last read Chinese is???? , what reason is this excuse me?

CodePudding user response:

VS2017 compile program under the xp,
Platform toolkit: Windows xp (V141_xp)
Character: the unicode character set