SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWToUTF8Converter Class Reference

Converts UTF-16 values to UTF-8. More...

#include <rw/stream/RWToUTF8Converter.h>

Public Member Functions

void convert (const RWUChar *from, size_t len, RWCString &to)
 
void convert (const RWWString &from, RWCString &to)
 
void convert (const std::wstring &from, RWCString &to)
 
void convert (const wchar_t *from, size_t len, RWCString &to)
 
void convert (RWUChar from, RWCString &to)
 
void convert (wchar_t from, RWCString &to)
 

Detailed Description

RWToUTF8Converter converts RWUChar, RWWString, wchar_t or std::wstring UTF-16 values to UTF-8. The character or string to be converted must encoded in UTF-16. To translate other encodings, use converters supplied by the Internationalization Module.

Member Function Documentation

◆ convert() [1/6]

void RWToUTF8Converter::convert ( const RWUChar * from,
size_t len,
RWCString & to )

Converts several UTF-16 RWUChar to a UTF-8 encoded RWCString.

◆ convert() [2/6]

void RWToUTF8Converter::convert ( const RWWString & from,
RWCString & to )
inline

Converts a UTF-16 RWWString to a UTF-8 encoded RWCString.

◆ convert() [3/6]

void RWToUTF8Converter::convert ( const std::wstring & from,
RWCString & to )
inline

Converts a UTF-16 std::wstring to a UTF-8 encoded RWCString.

◆ convert() [4/6]

void RWToUTF8Converter::convert ( const wchar_t * from,
size_t len,
RWCString & to )

Converts several UTF-16 wchar_t's to a UTF-8 encoded RWCString.

◆ convert() [5/6]

void RWToUTF8Converter::convert ( RWUChar from,
RWCString & to )

Converts one UTF-16 RWUChar to a UTF-8 encoded RWCString.

Parameters
fromcontains the UTF-16 character to convert.
toreturns the resulting UTF-8 string

◆ convert() [6/6]

void RWToUTF8Converter::convert ( wchar_t from,
RWCString & to )
inline

Converts one UTF-16 wchar_t to a UTF-8 encoded RWCString.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.