phantomjs icon indicating copy to clipboard operation
phantomjs copied to clipboard

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

Open kevinsimper opened this issue 11 years ago • 8 comments

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?

kevinsimper avatar Dec 17 '14 12:12 kevinsimper

solution?

Xychun avatar Jun 17 '15 07:06 Xychun

No solution for this and it's closed?

hebbian avatar Jul 23 '15 05:07 hebbian

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

kevinsimper avatar Jul 23 '15 08:07 kevinsimper

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 avatar Aug 12 '15 15:08 Xychun

@Xychun it solved to me too.

lisotton avatar Aug 20 '15 23:08 lisotton

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

reenko avatar Apr 01 '16 05:04 reenko

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

gadarsoe avatar Nov 30 '16 06:11 gadarsoe

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.

DevAtCN avatar Jan 27 '17 09:01 DevAtCN