I wanted to add a latin capital O with circumflex [ô] to a file in emacs, but for some reason all my attempts lead to the character being replaced by a question mark ?. I tried :

  • M-x insert-char u00D4
  • M-x insert-char U+00D4
  • C-x 8 RET u00D4
  • C-x 8 RET d4
  • C-x 8 RET U+00D4

I am not sure what the problem is. When I use UNICODE hex instead of its full name the error wrong type argument: characterp nil comes up

  • First thing to check: do you see the same thing if you start Emacs with emacs -Q? If not, bisect your init file to find the culprit.
    – Drew
    Jan 31, 2021 at 18:43

1 Answer 1


Those mostly work for me in Emacs 27.1, though you should note that correct name is "LATIN CAPITAL LETTER O WITH CIRCUMFLEX". If you don't have autocompletion in this prompt (there is none by default) you do have to get the name exactly correct.

It supports using either the character name or the codepoint number (in hex), but not the u00D4 or U+00D4 forms. If you try the latter then you should get an "Invalid character" error.

If you still can't get it to work, try running emacs -Q. If that works, then the problem is in your Emacs configuration.

  • I have completion with insert-char: o with circumflex TAB gives me 13 completions including the one the OP wants: clicking on it selects it. OTOH, if the OP still gets a ? after inserting it correctly, then it might be a font problem, I should think.
    – NickD
    Jan 31, 2021 at 13:58
  • 1
    I'd forgotten about fonts, but a missing glyph should result in a square box or a box with 00D4 in it rather than a question mark or a replacement character.
    – db48x
    Jan 31, 2021 at 14:30
  • 1
    I'd say that something in the encoding configuration is wrong, like inserting utf8 in utf-16 or whatever other combination. I'd ask @probo243 to describe coding system and inserted char.
    – Muihlinn
    Jan 31, 2021 at 15:09
  • 1
    This, although old, supports my suspects, which are that, just a suspect.
    – Muihlinn
    Jan 31, 2021 at 15:18
  • @dbx48x: yes, you are right - I forgot about the box thingies.
    – NickD
    Jan 31, 2021 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.