Leon Anavi
IT Tips && Tricks

Mobile & Embedded

Created: 18.07.2009 18:01 Last Modified: 12.04.2010 20:49 Views: 8997
Keywords: Convert, String, TBuf, TBuf16, TBuf8, Unicode

Convert 8-bit String Descriptor to 16-bit

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

  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.