LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to check which encoding my arm-Linux is using without the locale utility? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-check-which-encoding-my-arm-linux-is-using-without-the-locale-utility-4175473368/)

henryyao 08-14-2013 11:03 AM

how to check which encoding my arm-Linux is using without the locale utility?
 
Hi, all

I'm having a problem to check which encoding my arm-Linux is using, and there is no locale utility in this customized linux.

And btw, I dont even have /etc/sysconfig/i18n file(what's this file used for?).

For those who knows QT, I'd like to explain more why I need to do the above.
I'd like to display something in Chinese in QT application on my arm-Linux device, however, I cannot get the correct character. I've already used QTextCodec::codecForName("UTF-8"). So I guess its the problem with the Linux system itself. I'd like to check if the Linux is using UTF-8 but I cannot achieve that since I dont have a locale utility.

Also, can someone explain the relations between locale utility and the X screen system?

markush 08-16-2013 01:13 AM

Hi,

please open a terminal and check the output of
Code:

echo $LANG
and then tell us which distribution you're using with your ARM-device.

Markus

henryyao 08-22-2013 03:09 PM

Quote:

Originally Posted by markush (Post 5010194)
Hi,

please open a terminal and check the output of
Code:

echo $LANG
and then tell us which distribution you're using with your ARM-device.

Markus


The system gives nothing after I type echo $LANG. The reason for that is the locale utility is not installed in the system

markush 08-23-2013 01:55 AM

$LANG is an environment variable, it's independent of any installed packages. You should set it with
Code:

LANG=zh_CN.utf8
export LANG

Then open some programs from this terminal. Note that this setting isn't permanent, but if it works you should look into the documentation of your distribution in order to find out how to make environment variables permanent.

$LANG tells the programs in which language they should communicate with the user. Have a look at this document, maybe it is helpful.

Markus


All times are GMT -5. The time now is 05:53 PM.