MSDN Archive Home
Help and FAQs
All Resource Updates
Change History (all pages)
Resource Page Description
A set of C++ classes that provide Unicode UTF-8 <-> UTF-16 conversion, and load text from and save text to files using Unicode UTF-8.
A demo MFC application is included (however, these classes can be used in general non-MFC contexts, too).
This project contains classes to convert between
(useful to store text data
applications), and Unicode
(useful to process text data
While C#/VB.NET programmers have classes in the .NET framework that automatic convert Unicode UTF-16 text to UTF-8 before saving to files, and
, this project shows how to do that in C++
An MFC demo program is included, too. However, these C++ classes are
from MFC, so they can be used also in non-MFC contexts (e.g. ATL/WTL apps).
The source code provided is full of comments to illustrate the several steps.
(The demo MFC application shows also some basic and useful MFC techniques, like using file open/save common dialogs, or assigning a custom font to an edit control, or using multi-line edit controls, etc. So, this C++ code could be useful for MFC learners, too.)
Jun 5 2008 at 9:47 PM
, version 2
Jun 23 2008 at 1:57 PM
Since VC8 (in Visual Studio 2005) there is a support for Unicode UTF-8 and UTF-16 in CRT:
_open and _wopen (CRT)
Thanks to Mihai Nita (internationalization very expert) for pointing that out.
Aug 1 2008 at 12:11 PM
Added UTF8ConsoleTest sample program, that shows how to use UTF-8 helper classes in a console-mode app (without the complexity of a GUI MFC application).
(See the file UTF8ConsoleTest.cpp in UTF8ConsoleTest.zip archive.)
Aug 1 2008 at 5:27 PM
"UTF8 Helpers All-In-One.zip" file in Downloads section updated with new content (i.e. UTF8ConsoleTest sample program).
Dec 6 2008 at 10:18 AM
This is pretty useful. Thanks a lot!
Dec 23 2008 at 12:31 PM
Thank you, Wykie.
Sign in to add a comment
Thu Jun 5 2008 at 7:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.