@eniko With modern Windows, you can set the locale codepage to UTF-8 and it should just work doing everything in UTF-8 not touching wchar_t. Arguably this is the best way to do things, but it doesn't respect systems with legacy unix systems with non-UTF-8 encodings. Modern C also has char32_t (always UTF-32) which can be used if you're worried the system wchar_t is broken like on Windows but what you can easily do with it is limited..