×
Namespaces

Variants
Actions

Text conversion between 16-bit Unicode and UTF-8 using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s): S60 (All Editions), Series 80
Article
Created: User:Technical writer 1 (April 7, 2005 (Updated: November 14, 2007))
Last edited: hamishwillee (30 May 2013)

Description

CnvUtfConverter class provides static methods for converting 16-bit Unicode (UCS-2) descriptors to 8-bit (UTF-8) format, and vice versa.

Solution

 #include <utf.h>    // link against charconv.lib
 
 // Copy data from srcBuf16 to destBuf8
 CnvUtfConverter::ConvertFromUnicodeToUtf8( destBuf8, srcBuf16 );
 
 // Copy data from srcBuf8 to destBuf16
 CnvUtfConverter::ConvertToUnicodeFromUtf8( destBuf16, srcBuf8 );
This page was last modified on 30 May 2013, at 07:36.
67 page views in the last 30 days.