[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to search for characters displayed as octal codes in the buffer?
From: |
Eli Zaretskii |
Subject: |
Re: How to search for characters displayed as octal codes in the buffer? |
Date: |
Wed, 17 Jul 2019 11:19:03 +0100 |
User-agent: |
K-9 Mail for Android |
On July 17, 2019 11:00:40 AM GMT+01:00, ken <gebser@mousecar.com> wrote:
> On 7/16/19 9:36 PM, ken wrote:
> > On 7/16/19 8:43 PM, Noam Postavsky wrote:
> >> On Sun, 14 Jul 2019 at 10:50, ndame <emacsuser@freemail.hu> wrote:
> >>> Sometimes I have unprintable characters in the buffer which
> display with an octal code (e.g. \232). instead of a character (text
> copied from elsewhere, etc.)
>
> I've had this same problem for years. The odd thing is that, I can
> copy
> some text with non-English characters into vi or even into bash
> without
> any problem. But if I paste that same text into emacs, then those
> unprintable octal codes show up.
>
> It's not a problem with some missing fonts... I know this because, as
> said, there's no problem pasting into vi or into bash. Also, if I
> change the software "keyboard" containing those same characters, I can
> type those characters into an emacs buffer just fine.
>
> My guess is that emacs has some problem converting utf-16 into
> utf-8...
> but just for some characters, those which end up being displayed as
> octal codes.
Emacs doesn't have any problems converting text from UTF-16 to UTF-8. What you
describe is a clear sign of incorrect settings. If you are pasting into a TTY
frame, then the problem is most probably with your keyboard encoding
(keyboard-coding-system). If you are pasting into a GUI frame, take a good
look at selection-coding-system (assuming you are on X).
Other programs may not have these problems because they don't try to decode the
pasted text, and instead just blibdly assume some encoding.