help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font or face problem in emacs


From: H.S.
Subject: Re: font or face problem in emacs
Date: Thu, 29 Jun 2006 18:37:31 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2

Peter Dyballa wrote:

Am 29.06.2006 um 22:50 schrieb H.S.:

g++ -Wall -ansi -o testprog testprog.cc
testprog.cc: In function ‘int main()’:
testprog.cc:6: warning: unused variable ‘i’
testprog.cc:6: warning: unused variable ‘j’

Compilation finished at Thu Jun 29 15:01:30
----------------------------------------------------------------

The strange characters around a variable are(I have typed the backslashes and numbers so that they are displayed properly here):
on left hand side: â\200\230
on right hand side: â\200\231


What you see here is UTF-8 represented as 8bit:

U+2018 = E2 80 98 : LEFT SINGLE QUOTATION MARK  = ‘
U+2019 = E2 80 99 : RIGHT SINGLE QUOTATION MARK = ’

â is E2 in hex
200 oct is 80 in hex
230 oct and 231 oct are 98 resp. 99 in hex.

Make the *compilation* buffer be encoded in UTF-8 or make your LANG or LC_CTYPE environment variables 8 bit -- could be there is some option in your g++ to stay in 8 bit when printing some message.

--
Greetings

  Pete

“Computers are good at following instructions, but not at reading your mind.”
   - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9

Yup, you are right. I just discovered another post in this newsgroup. This seems to have worked:
M-x prefer-coding-system RET utf-8 RET
which is from:
http://groups.google.ca/group/gnu.emacs.help/browse_thread/thread/49787de21a638740/d3fdc305681db276?lnk=st&q=%22%5C200%5C230%22+emacs&rnum=2&hl=en#d3fdc305681db276


So, do I need to use the above command everything or is there a problem with the way emacs treats various locales? I have:
$> set | grep -i lang
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en_US:en_GB:en

->HS





reply via email to

[Prev in Thread] Current Thread [Next in Thread]