ByteBuffer
의 데이터는 제로 - 종료 ASCII입니까? 이 경우이 같은 문자열을 만들 수 있습니다
String str((const char*)(byteBuf.GetPointer()));
그렇지 않으면 당신이 ByteBuffer
가 Tizen::Text::Encoding를 사용하여 디코딩 할 수만큼 당신은 인코딩이 무엇인지 알고있다. 예 :
// Construct some test data. In your case the buffer would come
// as a HTTP response.
char chars[] = "\xE5\xE6\xF6"; // æåø in ISO-8859-1
ByteBuffer byteBuf;
byteBuf.Construct((byte*)chars, 0, 3, 3);
Encoding* pEnc = Encoding::GetEncodingN(L"ISO-8859-1");
String str;
pEnc->GetString(byteBuf, 0, byteBuf.GetRemaining(), str);
Label *pLabel = static_cast<Label*>(GetControl(IDC_LABEL1));
pLabel->SetText(str);
ByteBuffer는 클래스입니까? getchar() public 멤버 함수가 있습니까? –
@NishithJainMR. 아닙니다. GetWChar가 있습니다. – Cyril
결과로'wstring' 또는'string'을 찾으십니까? ByteBuffer에는 어떤 인코딩이 있습니까? –