How to use UTF8-CPP with different C++ standards
masterThe library provides different API patterns depending on the C++ standard used by your compiler:
C++11 and later
The library exposes modern APIs that support standard Unicode strings (u16string) and move semantics.
Pre-C++11
You must use iterator-based functions and provide a container (like std::vector<unsigned short>) to receive the converted data.
Manual Standard Selection
If you want to override the automatic detection of the C++ standard (e.g., if your compiler's __cplusplus macro is unreliable, like in some versions of MSVC), define the UTF_CPP_CPLUSPLUS macro before including utf8.h. Assign it a value corresponding to the desired standard (matching the __cplusplus macro values).