UTF8Conv

Downloads

Description

UTF8Conv is a C++ helper class that uses the Windows Win32 API to convert text to and from UTF8 format.

Functions

Macro Description
UTF82T Convert UTF8 to T
T2UTF8 T to UTF8
W2UTF8 WCHAR* to UTF8
UTF82W UTF8 to WCHAR*

T is in unicode build defined a WCHAR* else it is defined as CHAR*

Usage examples

#include "UTF8Conv.h";
 ... ... 
std::wstring strW = "My Unicode string";
std::string strUTF8 = W2UTF8(strW.c_str());
Tags