LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2013, 11:03 AM   #1
henryyao
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Rep: Reputation: 0
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?
 
Old 08-16-2013, 01:13 AM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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
 
Old 08-22-2013, 03:09 PM   #3
henryyao
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by markush View Post
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
 
Old 08-23-2013, 01:55 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
$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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing utility output in specific locale (LANG=en_US.UTF-8) davidlt Linux - Newbie 1 01-17-2012 05:59 AM
new locale whith other encoding compiler Linux - General 7 01-15-2008 05:45 AM
Adding new LOCALE in arm Vishak V Kurup Linux - Newbie 0 01-02-2008 12:24 AM
Re: Locale problem: Can't convert string from native encoding to 'UTF-8' treotan Ubuntu 1 11-14-2007 08:02 AM
Slackware 12 - Setting locale - english language, koi8-r encoding. ErV Slackware 5 07-12-2007 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration