Using localedef to add more supported locales

Your system keeps telling you a locale is not supported by your system’s C library? For example:

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_US.UTF-8
svn: warning: please check that your locale name is correct

or:

firefox: (process:4376): Gtk-WARNING **: Locale not supported by C library.
Using the fallback ‘C’ locale.

or even while compiling software, such as:

setlocale(LC_CTYPE,”en_US.UTF-8″) failed!
make: *** [extra/locale/c8tables.h] Error 1

You can use “localedef” to add them to the cache from the verbose source definitions:

localedef -i en_US -c -f UTF-8 en_US.UTF-8

Update: Note to self:

iconv -f windows-1252 -t utf-8 in.txt > out.txt

Leave a Reply

You must be logged in to post a comment.