Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

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

From 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.
86 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.

×