Removing smart quotes from gcc output

| 1 Comment | No TrackBacks
A lot of programs can't deal with the "smart quotes" gcc prints in it's errors. If you have one program calling gcc and parsing the output, you might see something like:

foo.h:45: error: expected âââ}âââ at end of output

One fix I've found for this is to change the locale gcc uses for localization. You can do this using the LC_ALL environment variable (see the gcc man page). Setting its value to "C" normalizes the output to standard ASCII. In bash that's:

export LC_ALL=C

No TrackBacks

TrackBack URL:

1 Comment

Thank you!

Leave a comment

Myself

Projects

Monthly Archives

Photos

About this Entry

This page contains a single entry by Robert W. Rose published on January 29, 2009 11:42 AM.

SlickEdit: Pop to active file in the project browser was the previous entry in this blog.

Computers Take Flight is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.