Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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: What does it mean when my text is displayed as boxes?

like image 336
1800 INFORMATION Avatar asked Oct 20 '08 00:10

1800 INFORMATION


People also ask

Why do I see question marks instead of text?

The question marks indicate font substitution occurred because your Mac does not have the same font that was used when the content was created. The substituted font does not have the glyphs (character shapes) that exist in the specified font that is not present.

What does question mark mean in a text message?

The QUESTION MARK is a request for clarity or confirmation. The QUESTION MARK emoji ( ) is often used in text messaging as a request for clarity or confirmation.

Why does my iphone text have a question mark?

Answer: A: The emoji may not be available for the recipient's phone then it will display as a question mark.

Why is my image showing up as a question mark?

The picture files were edited or modified with a computer, or the file format is not supported. Pictures edited or modified by a computer may not display on the digital photo frame. Ensure the pictures are saved in a compatible file format.


2 Answers

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.
like image 195
Michael Burr Avatar answered Sep 20 '22 05:09

Michael Burr


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.

like image 36
Adam Rosenfield Avatar answered Sep 19 '22 05:09

Adam Rosenfield