I try to draw text using a dll library which has only interfaces of ANSI version encapsulated windows ANSI apis, but I need to store string data using utf-8. I don\'t want t
UTF8 is not a codepage, and as codepages only make sense to ANSI functions, you can't do what you're asking.
If you want to store string as UTF8, you WILL need to convert from the ANSI of your app to unicode (wide char) using MultiByteToWideChar()
then use WideCharToMultiByte()
to convert to UTF8.
Alternatively, update you app to use unicode/wide strings internally, and convert as needed.