LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-07-2014, 03:08 PM   #1
yech
LQ Newbie
 
Registered: Dec 2007
Posts: 22

Rep: Reputation: 0
Question file name display problem


I have a file with Chinese GB2312 name on ext3 partition of a Linux box. From Windows using a ssh client application connect to the Linux box, and just do ls in the folder containing the file. The file name is displayed wrongly like ????, but if redirect the ls output to a file and cat the file, the file name displayed correctly. So the question is who generates the wrong ???? file name?

Below is the command output:

Click image for larger version

Name:	chinese_filename_display.jpg
Views:	3
Size:	8.5 KB
ID:	14697

Last edited by yech; 02-07-2014 at 03:18 PM.
 
Old 02-07-2014, 03:40 PM   #2
baldur_1
Member
 
Registered: Sep 2010
Posts: 133

Rep: Reputation: 13
what is the file type? is it a multimedia file?
 
Old 02-07-2014, 04:09 PM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Can you post the output of the locale command
jdk
 
Old 02-07-2014, 09:44 PM   #4
yech
LQ Newbie
 
Registered: Dec 2007
Posts: 22

Original Poster
Rep: Reputation: 0
The file is an empty file, no extension. The file can be created by command:


touch `echo -e "\xd6\xd0\xb9\xfa"`


The problem can be seen by:

# ls
4 5 ????

# ls | cat
4
5
й


The locale output is:


LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=C
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=


And I also try zh_CN.gb18030, but same thing.
Even when the file name and locale all use en_US.UTF-8, also same thing.

Last edited by yech; 02-07-2014 at 09:47 PM.
 
Old 02-08-2014, 02:01 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Can you try filling in the LANGUAGE parameter
Code:
LANGUAGE=en_US:en
maybe that will help.
jdk
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Ubuntu display problem on dual display system joboy Linux - General 2 05-01-2011 11:00 AM
Problem in read a text file and display in DOS command... steve2688 Programming 7 06-17-2009 04:04 AM
Display by File Name, File Size, and File Owner using ls akeenabawa Linux - Newbie 9 08-15-2008 03:21 PM
Problem withChanging DISPLAY environment variable to display on someone else's screen wantsri Linux - Networking 1 10-25-2005 12:14 PM
RH9 Shrike /sbin/loader display problem with SIS 630 laptop - display is blank ! johnvoisey Red Hat 4 11-01-2003 07:52 AM

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

All times are GMT -5. The time now is 01:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration