I think this approach fits your scenario exactly.
Leave all your lines narrow, use sprintf and strstr , as before, to read and write from text files that are always considered UTF-8 without specifications, etc. All you need to change is your communication with the system. Suppose now that the strings are UTF-8, and before calling to MFC or Windows, convert to UTF-16 on the fly.
As a bonus, you get easier portability for non-Windows platforms compared to the approach recommended by Microsoft.
source share