我尝试使用以下代码进行转换:
template< unsigned int size >
static QString
TBuf82QString( const TBuf8< size > &buf )
{
return QString::fromUtf16(
reinterpret_cast<unsigned short*>(
const_cast<TUint8*>(
buf.Ptr() ) ), buf.Length() );
}
但它总是返回类似?????b
.
编辑:更改的代码示例