Ubuntu – Server locale C vs en_US.UTF-8

i18nlocalizationMySQLPHPUbuntu

I am considering to change all of my server locale to C by

"export LC_ALL=C"

Is it a common practice?

I am thinking will there be any side effect on a LAMP server, or should I just leave as using the default of "en_US.UTF-8"?

Best Answer

You might want to edit /etc/default/locale to set the locale as your export command will only affect the current environment. It will not affect already running programs.

The issue you had mentioned regarding grep was fixed a few years ago already:

fixed in grep 2.7, released Sep 20, 2010

In multibyte locales, regular expressions including backreferences
no longer exhibit quadratic complexity (i.e., they are orders
of magnitude faster). [bug present since multi-byte character set
support was introduced in 2.5.2]

In UTF-8 locales, regular expressions including "." can be orders
of magnitude faster.  For example, "grep ." is now twice as fast
as "grep -v ^$", instead of being immensely slower.  It remains
slow in other multibyte locales. [bug present since multi-byte
character set support was introduced in 2.5.2]

http://savannah.gnu.org/forum/forum.php?forum_id=6521