How to fix warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

I recently encountered a problem when logging through SSH in to certain servers that I use for work when using my new Macbook Pro (running Lion 10.7.3).

So right after the login was completed I was getting the following message:

warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

It only happened on certain servers, for others everything would work just fine.
This caused a few problems when running some perl scripts that would complain about the locale variables not being set, even though my Terminal app was setup correctly.

To fix this I simply added the following to my ~/.bash_profile:

export LC_CTYPE="en_US.UTF-8"

Let me know if that helped you by leaving a comment below!

57 comments to How to fix warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

  • Thanks for finally writing about >How to fix warning: setlocale:
    LC_CTYPE: cannot change locale (UTF-8) <Liked it!

  • I see you don’t monetize your site, there is one cool method to earn extra money,
    it will work with your page perfectly, just search in google for: tips and tricks by Fejlando

    • Oh your poor fingers, Cei! My husband works nita&sg#8211;railrohd in the cold–and has the same issues. Bag Balm does help. Something tells me you’ve tried everything! Fascinating about the flipside eye…I have some experience with peacocks, and yet didn’t know this!

    • Junker23, I’m not sure. Granted, it’s still as quirky as can be, but there’s something linear about the trailer; like it has an actual plot. Anredson’s previous efforts (those I’ve seen), to me, felt like plot was simply buried behind the twee and quirk.

    • Szia Életem! Ãœdv a klubban!Én is átestem már ezen. Bár én nem ábrándultam ki Mr. Pattisonból. Egyszerűen érdekel, mert közvetlen, mert meggondolatlan, mert idióta, mert nem átlagos hálívúdi szépfiú. Egy fura jelenség. Egyetértek a többiekkel, pihenj és ne agyalj! Hidd el ez a legtöbb amit megtehetsz! Pusszantás! Heni

    • Enhnglteniig the world, one helpful article at a time.

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>