1

If I paste a string from some web page into an Emacs buffer sometimes it will show the Unicode representation of some characters with a backslash and some octal code. How can I convert this to the character representation?

Thanks.

  • Sounds like there's at least one wrong encoding going on. – wasamasa May 22 '15 at 11:12
  • 1
    I would usually try revert-buffer-with-coding-system and try to guess the coding system. Usually, if the guess fails, Emacs will display an information buffer with octal codes for characters, which failed to translated using the selected encoding. Moving the point to those characters and pressing RET will move the point to the place in the buffer, where the character appears, so it makes it easier to guess what it may have been. Sometimes, especially if that's on the web, the file cannot be viewed using one encoding and you'll have to patch it manually. – wvxvw May 22 '15 at 21:12
0

Specify whether you are using Emacs in a terminal or GUI Emacs.

  • Use a font in Emacs that can display that Unicode character.

  • If your buffer is Unibyte (single-byte), then consider using multibyte instead. In any case, see the Emacs manual, node Unibyte Mode and the Elisp manual, node Text Representations. Consider using function set-buffer-multibyte to convert the buffer to multibyte. See also (elisp) Disabling Multibyte (not to disable it, but for more info about it).

  • I am using GUI Emacs. – dmz73 May 29 '15 at 9:53
0

Copying the whole buffer and pasting it into another new buffer somethimes helps here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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