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

前端 未结 3 1189
面向向阳花
面向向阳花 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:19

    In Windows there are 2 common display problems that occur when trying to display Unicode characters:

    1. text sometimes appears as question marks

      • This occurs when Unicode data is converted to an 8-bit character set encoding (or technically multi-byte characters) usually via the system codepage (but other code pages can be specified in the conversion calls). If the target 8-bit character set doesn't include the characters needed, any characters not representable in the target character set get converted to question marks.
    2. text sometimes appears as boxes

      • This is a problem with the font not having the glpyh for a particular character. Boxes show up when there is a mismatch between Unicode characters in the document and those supported by the font. Specifically, the boxes represent characters not supported by the selected font.

提交回复
热议问题