From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: gcc errors in compiler output Date: Sun, 27 Dec 2009 02:01:22 +0100 Organization: Informatimago Message-ID: <87k4w9mdr1.fsf@hubble.informatimago.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1261878063 21626 80.91.229.12 (27 Dec 2009 01:41:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Dec 2009 01:41:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 27 02:40:56 2009 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.50) id 1NOi7p-00058z-J9 for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Dec 2009 02:40:53 +0100 Original-Received: from localhost ([127.0.0.1]:44940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOi7p-0000AL-SC for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Dec 2009 20:40:53 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!newsserver.news.garr.it!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 62 Original-X-Trace: individual.net ugtPPPb6mnud4yW83hgPbwvZrBsXSfROEyTHvvDlCx9Cw8FwNo Cancel-Lock: sha1:ZTM5NmJiMzZjMmJlMjJjMmYyNDdiZjNiYjBkNmY0ZDQ4NWY1NDIzNg== sha1:HFCMFtzdRNK82c0gZVUtClIcRIQ= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.3 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:175809 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:70884 Archived-At: Julianne writes: > When using emacs 23.1 on Fedora 12, compiling a simple c file with an > error yields the following output: > > > gcc -o my_test my_test.c > my_test.c: In function ‘main’: > my_test.c:58: error: expected ‘;’ before ‘x’ > > If I run the compiler in an ordinary xterm (or Konsole), the output > appears to be some colorization of the identifiers in the context of > the error. That's where your error lies. It is not a colorization, but an encoding in utf-8 of the characters ‘ and ’: my_test.c: In function ‘main’: my_test.c:58: error: expected ‘;’ before ‘x’ > The hex dump shows the missing charaters: > > 6d 79 5f 74 65 73 74 2e 63 3a 20 49 6e 20 66 75 |my_test.c: In fu| > 6e 63 74 69 6f 6e 20 e2 80 98 6d 61 69 6e e2 80 |nction ...main..| > 99 3a 0a 6d 79 5f 74 65 73 74 2e 63 3a 35 38 3a |.:.my_test.c:58:| > 20 65 72 72 6f 72 3a 20 65 78 70 65 63 74 65 64 | error: expected| > 20 e2 80 98 3b e2 80 99 20 62 65 66 6f 72 65 20 | ...;... before | > e2 80 98 78 e2 80 99 0a |...x....| I see no missing character here. > What is the solution to either a) get gcc to not output terminal color > settings around identifiers or b) make emacs ignore the extraneous > stuff around the identifiers? Configure the same encoding in your terminal and in your shell! If your terminal handles UTF-8: [pjb@hubble :0.0 tmp]$ export LC_CTYPE=en_US.UTF-8 [pjb@hubble :0.0 tmp]$ cc -c -o a.o a.c a.c: In function ‘main’: a.c:3: error: expected ‘;’ before ‘x’ If your terminal handles ISO-8859-1: [pjb@hubble :0.0 tmp]$ export LC_CTYPE=en_US.ISO-8859-1 [pjb@hubble :0.0 tmp]$ cc -c -o a.o a.c a.c: In function 'main': a.c:3: error: expected ';' before 'x' etc... -- __Pascal Bourguignon__ http://www.informatimago.com/