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

Created on 17 Dec 2014  路  8Comments  路  Source: ariya/phantomjs

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?

Most helpful comment

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.

All 8 comments

solution?

No solution for this and it's closed?

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
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.

@Xychun it solved to me too.

It reprodused on [email protected] and solution for me
export LC_ALL=en_US.UTF-8
sudo dpkg-reconfigure locales

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olee picture olee  路  4Comments

dhilipsiva picture dhilipsiva  路  4Comments

bhuvnesh2703 picture bhuvnesh2703  路  3Comments

maboiteaspam picture maboiteaspam  路  3Comments

Snowlav picture Snowlav  路  3Comments