×
Namespaces

Variants
Actions

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

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

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: lpvalente (11 Jun 2014)

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 11 June 2014, at 17:16.
75 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×