2 ms·
Modern versions of Visual Studio allow you to configure your project as one of ASCII/UNICODE/MBCS. MBCS (multi-byte character set) is UTF8 compatible. TCHAR bec
by ComputerGuru 11y ago
Modern versions of Visual Studio allow you to configure your project as one of ASCII/UNICODE/MBCS. MBCS (multi-byte character set) is UTF8 compatible. TCHAR becomes char (instead of the usual wchar_t) and most APIs you call via their once-ANSI names (e.g. CreateFile being #ifdef'd to CreateFileA) will actually accept UTF8 instead. Unfortunately, APIs that were created when ASCII was declared dead and without an xxxxA counterpart still need manual mapping to the xxxxW functions instead (which is just plain stupid on MS' behalf).