GiovanniDicanio / UnicodeConversionAtl

Unicode UTF-16 <-> UTF-8 string conversions using C++ and ATL CStringW/A classes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Win32 C++ Code Converting Between Unicode UTF-16 and UTF-8 Using CStringW/A

by Giovanni Dicanio

Description

C++ code that wraps the Win32 APIs MultiByteToWideChar() and WideCharToMultiByte() in a convenient way, using ATL/MFC CString(A/W) classes.

This code can be used for Unicode conversions between UTF-16 and UTF-8.

Japanese "kin"

ATL/MFC string classes are used, in particular:

  • CStringA is used to store UTF-8 text
  • CStringW is used to store UTF-16 ("wide") text

The reusable code can be found in the UnicodeConvAtl.h and UnicodeConvAtl.cpp files.

About

Unicode UTF-16 <-> UTF-8 string conversions using C++ and ATL CStringW/A classes.

License:MIT License


Languages

Language:C++ 100.0%