UTF8 vs Wide Char?
c++, unicode
Solution
If by "wide char", you are referring to `wchar_t`, then you have to take into account that it is 16-bit (using UCS-2 or UTF-16) on some platforms, but is 32-bit (using UTF-32) on other platforms. So asking how to convert to/from "wide char", you first have to define what "wide char" actually means. Proper 16-bit/32-bit data types need to be used when dealing with UTF-16/32.
Pretty much any Unicode library, including utf8-cpp and ICU, has functions for converting between UTF8<->UTF16 and UTF8<->UTF32 using appropriate data types and not relying on `wchar_t`.
Problem
I seem to be having some trouble wrapping my head around something. I am trying to create a C++ function to convert UTF8 to Wide. I started googling and found Boost, and ICU (both of which look way too large). Then I found the utf-cpp header library and that looked good. I found that via some thread on here. Then I read that thread and found https://stackoverflow.com/a/6155524 But how does those two functions turn a UTF32 string into Wide char? It just seems to be UTF32 to UTF8. I could not find any mention of Wide character on the utf-cpp header documentation... Anyways is there any sort of library to convert UTF8/16/32 to Wide and reverse? I was looking at http://src.chromium.org/svn/trunk/src/base/utf_string_conversions.cc which seems to use ICU, but it also has like 18 header files. Any help? Maybe it's just my broken head today. Edit: After rereading this it is two questions... really what I want to know is there a nice smallish library (like utf-cpp header) to handle wide characters & unicode.