I m' developing a python2.7 qt4 application that fetches non-latin characters from a mysql database and prints them to the console. I am using pydev and eclipse. The application runs fine when i run it from the eclipse IDE but when i run my app from the console it does not behave as it should. Any ideas why this might be happening? I am using an arch linux machine.
This might be because the default encoding of your terminal does not support UTF-8 characters.
Here is a link that describes how to change the default encoding of your terminal.
Here is a summary of what it describes:
/etc/locale.gen
, eg en_US.UTF-8 UTF-8
locale-gen
as root. To make the locale changes system-wide:
LANG="en_US.UTF-8"
to /etc/locale.conf
You may have to restart your terminal after the changes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.