Ubuntu VPS UTF-8 locale error

Setting up a VPS in the cloud is the current de facto method of launching services for startups and bigger companies alike. Supposedly, when someone would like to extend the default system locale it’s only a matter of putting the correct values within the correspondent user’s .bashrc file and you are good to go!

However, there is a known bug that prevents us from using our locale out of the box (more on that here), so these steps are necessary:

The main idea is to re-generate the default system locale and based on that we will be able to generate further locales.

Fire up your terminal of choice and issue the following command:

sudo locale-gen en_US.UTF-8

Followed by:

sudo dpkg-reconfigure locales

Now, you fill out your .bashrc with the necessary EXPORTs and you’ll be good to go!