Gangmax Blog

自由之思想,独立之精神

Unrecognized Characters Solution of Google Earth in Ubuntu 12.04

| Comments

Using Google Earth on Ubuntu 12.04 with your locale setting as Chinese(zh_CN.UTF-8) will cause the unrecognized characters problem.

I tried some solutions online, such as removing the “libQt*” files under “opt/google/earth/free/” directories but it didn’t work on my Ubuntu 12.04 environment.

Here is my solution.

It’s obvious that this problem only happens on a non-english locale, while I don’t think it’s a problem if it can work with English. So the solution is I “google-earth” with English locale/lang options. Create a bash file “earth.sh” like below:

1
2
3
4
5
6
#! /bin/bash
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

/usr/bin/google-earth "$@"

Add execution permission to this file: “chmod +x earth.sh”. Test it and it works! Copy this file to “/opt/google/earth/free/earth.sh”.

Then run “alacarte” to edit the “Google Earth” item in the main menu, change it from “/opt/google/earth/free/google-earth %f” to “/opt/google/earth/free/earth.sh %f”.

Now press the super key and select “Google Earth”, the GUI language is English now. Enjoy!

google_earth

Refer here.

Comments