From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: patrol Newsgroups: gmane.emacs.help Subject: Re: character encoding confusion Date: Thu, 8 Jul 2010 06:24:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2a9ce55f-08ba-420b-a0e3-3a7ba940258d@j8g2000yqd.googlegroups.com> References: <87pqyy7nx4.fsf@castleamber.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291844310 10830 80.91.229.12 (8 Dec 2010 21:38:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 21:38:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 22:38:24 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQRiS-0006l4-Kg for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 22:38:24 +0100 Original-Received: from localhost ([127.0.0.1]:39393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQRiS-00053h-0Y for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 16:38:24 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!j8g2000yqd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 173.34.86.168 Original-X-Trace: posting.google.com 1278595493 20518 127.0.0.1 (8 Jul 2010 13:24:53 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 8 Jul 2010 13:24:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j8g2000yqd.googlegroups.com; posting-host=173.34.86.168; posting-account=tRtJWQkAAABbewN3eJi0F90kUywr8NrS User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; MathPlayer 2.10d; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3),gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:179619 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76061 Archived-At: On Jul 7, 9:38=A0pm, John Bokma wrote: > Like Pascal wrote ASCII is 7 bit (0..127 decimal) and there are various > extensions ("code pages"). It sounds to me you're running your program > in a DOS box? If so the current code page, most likely 437 [1], of the DO= S > box shows a shaded box for 176. > > [1]http://en.wikipedia.org/wiki/Codepage_437 Thanks. That was helpful. I'm running Windows 7, and I found out that it's using code page 850, which, like 437, maps degree to 248 and the light shaded box to 176. I think I'm beginning to understand what's going on. Emacs is indeed encoding the file in Latin-1, but when it comes to the statement printf("%c", 248), it doesn't matter how the file itself is encoded; what matters is how the computer interprets this statement. And how it interprets this statement depends on the codepage that the operating system is using. Thanks! > John Bokma =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 j3b > > Hacking & Hiking in Mexico - =A0http://johnbokma.com/http://castleamber.c= om/- Perl & Python Development- Hide quoted text - Sounds like fun!