Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Ubuntu - Fontconfig warning: ignoring UTF-8: not a valid region tag #12835

Closed
kevinsimper opened this issue Dec 17, 2014 · 8 comments
Closed

Comments

@kevinsimper
Copy link

I am trying to use Phantomjs on Ubuntu, but i get this weird error.

Fontconfig warning: ignoring UTF-8: not a valid region tag

How can that be?

@Xychun
Copy link

Xychun commented Jun 17, 2015

solution?

@hebbian
Copy link

hebbian commented Jul 23, 2015

No solution for this and it's closed?

@kevinsimper
Copy link
Author

You would have to install these as on the download page, I think that was the solution:

sudo apt-get install build-essential g++ flex bison gperf ruby perl \
  libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \
  libpng-dev libjpeg-dev python libx11-dev libxext-dev

@Xychun
Copy link

Xychun commented Aug 12, 2015

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

Solved it for me.

@lisotton
Copy link

@Xychun it solved to me too.

@reenko
Copy link

reenko commented Apr 1, 2016

It reprodused on phantomjs@1.9.20 and solution for me
export LC_ALL=en_US.UTF-8
sudo dpkg-reconfigure locales

@gadarsoe
Copy link

For CentOS 7, that should be

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8

@DevAtCN
Copy link

DevAtCN commented Jan 27, 2017

I also faced same problem with DigitalOcean Ubuntu server. I fixed this using below commands:

sudo vim /etc/environment

Add below lines to the bottom of the "environment" file:

LANG="en_US.UTF-8"
LC_MESSAGES="C"
LC_ALL="en_US.UTF-8"

Now restart the OS and check locale and you will get:

LANG=en_US.UTF-8
LANGUAGE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Wola! You all set.

Hope this will help you.

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants