all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Ian Baylis <ibay0918@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Special Characters
Date: Wed, 12 Aug 2015 10:19:23 +0600	[thread overview]
Message-ID: <CAP_d_8XWGJDbzZq+if7j+k_jp1KFUPkegnH2p38uwh54cuqgHA@mail.gmail.com> (raw)
In-Reply-To: <CAF3G9oc3WPg32mS3Zi4FxTyk55TEu8k0gY6CKCwhqHb=oGC0qg@mail.gmail.com>

On Tue, Aug 11, 2015 at 11:55 PM, Ian Baylis <ibay0918@gmail.com> wrote:
> Thanks for the reply. Is there a list that contains all the octal
> representations of characters like \342\200\231?

If you’re interested, you might want to read a description of the
UTF-8 encoding, then browse the Unicode charts.

http://tools.ietf.org/html/rfc3629
http://www.unicode.org/charts/


However, I must ask: Why do you want to know? Are you going to
hand-decode files that come your way? Why not delegate that work to
computers?

There are many different character encodings. When people or software
do not agree on which one they use, misdecoding occurs. With some
experience, one can make an accurate guess at which encoding was used
originally, although this becomes less necessary as we migrate to
UTF-8.


PS: please don’t top-post.

> On Aug 11, 2015 1:22 PM, "Yuri Khan" <yuri.v.khan@gmail.com> wrote:
>>
>> On Tue, Aug 11, 2015 at 7:37 AM, Ian Baylis <ibay0918@gmail.com> wrote:
>> > I have a file that has special characters in it.   When I open the file
>> > in Emacs an ' is represented like:
>> > \200\231 or just \231
>>
>> The Unicode apostrophe ’ (U+2019 Right single quotation mark) is
>> encoded in UTF-8 as a sequence of three bytes, whose octal
>> representation is \342\200\231 (or hexadecimal E2 80 99).
>>
>> If your Emacs incorrectly picks e.g. the ISO-8859-1 (aka Latin-1)
>> encoding for this file, you will see the letter â (U+00E2 Latin small
>> letter a with circumflex), followed by two codes \200 and \231,
>> because those do not correspond to printable characters in Latin-1.
>>
>> In order to view the file as intended, you need to re-open that file
>> using the correct encoding (UTF-8). Eli has given you the command:
>>
>> C-x RET c utf-8 RET C-x C-f FILE-NAME RET
>>
>> Alternatively, if you already have a buffer visiting the file, you can
>> revert it using the correct encoding:
>>
>> C-x RET r utf-8 RET (you might need to confirm the revert).
>>
>> You then need to evaluate how often you use files in encodings other
>> than UTF-8. If rarely, you might want to set UTF-8 as your default
>> encoding.



      parent reply	other threads:[~2015-08-12  4:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  1:37 Special Characters Ian Baylis
2015-08-11  2:31 ` Emanuel Berg
2015-08-11  2:33   ` Emanuel Berg
2015-08-11  3:11     ` Emanuel Berg
2015-08-11 16:42   ` Marcin Borkowski
2015-08-12  2:49     ` Emanuel Berg
2015-08-12  7:56       ` Marcin Borkowski
2015-08-13  1:27         ` Emanuel Berg
2015-08-11  2:41 ` Ian Zimmerman
2015-08-11  2:46 ` Eli Zaretskii
     [not found] ` <mailman.8111.1439261223.904.help-gnu-emacs@gnu.org>
2015-08-11  2:57   ` Ian Baylis
2015-08-11  3:04     ` Rusi
2015-08-11 17:21 ` Yuri Khan
     [not found]   ` <CAF3G9oc3WPg32mS3Zi4FxTyk55TEu8k0gY6CKCwhqHb=oGC0qg@mail.gmail.com>
2015-08-12  4:19     ` Yuri Khan [this message]

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

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

  git send-email \
    --in-reply-to=CAP_d_8XWGJDbzZq+if7j+k_jp1KFUPkegnH2p38uwh54cuqgHA@mail.gmail.com \
    --to=yuri.v.khan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ibay0918@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.