What does it mean when my text is displayed as Question Marks?

前端 未结 3 1200
面向向阳花
面向向阳花 2020-12-03 15:30

I\'m attempting to display some text in my program using (say) Windows GDI and some of the unicode characters are displayed as question marks? What is up?

See also:

3条回答
  •  半阙折子戏
    2020-12-03 16:02

    It means your Unicode text is getting converted to ANSI text somewhere. Since Unicode characters outside of Latin-1 can't be converted to ANSI, they are converted to question marks. Make sure that your program is compiled with Unicode support on (i.e. the preprocessor symbols UNICODE and _UNICODE are #defined by your project), so that you're always calling the proper Unicode versions of the various Windows functions.

提交回复
热议问题