unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gebser@mousecar.com,ken <gebser@mousecar.com>,help-gnu-emacs@gnu.org
Subject: Re: How to search for characters displayed as octal codes in the buffer?
Date: Wed, 17 Jul 2019 11:19:03 +0100	[thread overview]
Message-ID: <2E4F9783-6179-4555-BB0F-3D66C4D458EF@gnu.org> (raw)
In-Reply-To: <55a449be-8853-9fe3-8e7b-38ccfab96df8@mousecar.com>

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.



  reply	other threads:[~2019-07-17 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14 14:50 How to search for characters displayed as octal codes in the buffer? ndame
2019-07-17  0:30 ` Perry Smith
2019-07-17  0:43 ` Noam Postavsky
2019-07-17  1:36   ` ken
2019-07-17 10:00     ` ken
2019-07-17 10:19       ` Eli Zaretskii [this message]
2019-07-17 10:33   ` Dan Sommers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2E4F9783-6179-4555-BB0F-3D66C4D458EF@gnu.org \
    --to=eliz@gnu.org \
    --cc=gebser@mousecar.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).