<p>I'm accessing an Ubuntu machine using PuTTY, and using gcc.</p>

<p>The default <code>LANG</code> environment variable on this machine is set to <code>en_NZ.UTF-8</code>, which causes GCC to think PuTTY is capable of displaying UTF-8 text, which it doesn't seem to be. 
Maybe it's my font, I don't know - it does this:</p>

<pre><code>foo.c:1: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â at end of input
</code></pre>

<p>If I set it with <code>export LANG=en_NZ</code>, then this causes GCC to behave correctly, I get:</p>

<pre><code>foo.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
</code></pre>

<p>but this then causes everything else to go wrong. For example</p>

<pre><code>man foo
man: can't set the locale; make sure $LC_* and $LANG are correct
</code></pre>

<p>I've trawled Google and I can't for the life of me find out what I have to put in there for it to just use ASCII. <code>en_NZ.ASCII</code> doesn't work, nor do any of the other things I can find.</p>

<p>Thanks</p>

[{'answer_id': 27051, 'author': 'C. K. Young', 'author_id': 13, 'author_profile': 'https://Stackoverflow.com/users/13', 'pm_score': 3, 'selected': True, 'text': '<p><code>LANG=en_NZ</code> is correct. However, you must make locale files for <code>en_NZ</code>.</p>\n\n<p>For Ubuntu, edit <code>/var/lib/locales/supported.d/local</code> and add <code>en_NZ ISO-8859-1</code> to the file. If your system is another distribution (including Debian), the location will be different. Look at <code>/usr/sbin/locale-gen</code> and see where it stores this info.</p>\n\n<p>Afterwards, run <code>locale-gen</code> to create the <code>en_NZ</code> locale file. Hope this helps!</p>\n'}, {'answer_id': 27053, 'author': 'Cebjyre', 'author_id': 1612, 'author_profile': 'https://Stackoverflow.com/users/1612', 'pm_score': 2, 'selected': False, 'text': "<p>Putty can display utf - I think it is in appearance -> translation (or something, I don't have access to it right now).</p>\n"}, {'answer_id': 1419312, 'author': 'drewr', 'author_id': 3227, 'author_profile': 'https://Stackoverflow.com/users/3227', 'pm_score': 0, 'selected': False, 'text': "<p>For Debian 5.0 Lenny:</p>\n\n<pre><code>aptitude install locales\n</code></pre>\n\n<p>If that's already installed:</p>\n\n<pre><code>dpkg-reconfigure locales\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/27044', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/234/']