unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* character encoding confusion
@ 2010-07-07 16:27 patrol
  2010-07-07 22:37 ` Pascal J. Bourguignon
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: patrol @ 2010-07-07 16:27 UTC (permalink / raw)
  To: help-gnu-emacs

I created a program in C that requires the degree symbol. The mode
line indicates that Emacs is using the Latin-1 character encoding.
According to Latin-1 encoding tables, the degree symbol is encoded as
decimal 176, so that's what I used in my code. But when the character
printed, it wasn't the degree symbol; it was a "shaded box" looking
thing. Then I looked at an ASCII table here (http://
www.asciitable.com/), and it says that 176 is indeed the shaded box
that was printed in my program, and the degree character was decimal
248. So I used 248 in my code, and I got the degree symbol I wanted.

But all this leaves me with the question that if Emacs was supposedly
encoding the file in Latin-1, why doesn't the code for the degree
symbol match up with the Latin-1 table? Why does it instead match up
with some non-standard "extended" ASCII that I just happened to come
across.

Can anyone shed light on this?
Thanks


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-07-08 15:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07 16:27 character encoding confusion patrol
2010-07-07 22:37 ` Pascal J. Bourguignon
2010-07-08  0:19   ` patrol
2010-07-08  1:15     ` Barry Margolin
2010-07-08 15:40     ` Pascal J. Bourguignon
2010-07-08  1:38 ` John Bokma
2010-07-08 13:24   ` patrol
2010-07-08  7:32 ` Tim X
2010-07-08 13:30   ` patrol

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).