This article shows how to convert Symbian OS non-Unicode string descriptor to Unicode string descriptor. Non-Unicode text is saved as 8-bit string descriptors and 16-bit string descriptors are used for presentation of Unicode text data.
Examlpe how to convert TBuf8 to TBuf16:
//Declare non-Unicode string descriptor
TBuf8<10> sNonUnicode;
//Initialize content
sNonUnicode.Append(_L("Hello!"));
//Declare Unicode string descriptor
TBuf<10> sUnicode;
//Conversation
sUnicode.Copy(sNonUnicode);
Class references:
Class TBuf
Class TBuf16
Class TBuf8
|