[CentOS] Re: ls : not UTF-8 compliant?

Wed Feb 20 23:33:49 UTC 2008
Scott Silva <ssilva at sgvwater.com>

on 2/20/2008 3:14 PM Mufit Eribol spake the following:
> Michael A. Peters wrote:
>> Mufit Eribol wrote:
>>> Sorry bugging you for this simple command.
>>>
>>> ls command displays question marks for the local characters (ones not 
>>> included in 8859-1 space) in filenames.
>>>
>>> ie.
>>> [root at server aa]# touch �arp
>>> [root at server aa]# ls
>>> ??arp
>>> [root at server aa]# ls -b                    #for octal escapes
>>> \303\247arp
>>> [root at server aa]#
>>>
>>> However, ls|less, ls|more or vi <directory name> all display filename 
>>> correctly. Also, the <tab> completes such filenames in the correct 
>>> way. Even, logsave command for the ls output prints the right 
>>> characters.
>>>
>>> So, I assume the filesystem keeps the filenames in UTF-8 encoding, 
>>> but somehow ls can not show them properly.
>>>
>>> Any workaround or a replacement for ls? BTW The system is Centos 5.1 
>>> and locale shows the encoding as UTF-8.
>>>
>>> Thank you.
>>
>> Works for me.
>>
>> [mpeters at jerusalem tmp]$ touch �arp
>> [mpeters at jerusalem tmp]$ ls
>> �arp
>> [mpeters at jerusalem tmp]$ echo $LANG
>> en_US.UTF-8
>> [mpeters at jerusalem tmp]$
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
> Interesting! Perhaps it is a quirk of ssh using PuTTY. I haven't tried 
> it on the monitor connected. Did you try in on the monitor and CLI (no 
> X, no Gnome etc)?
Remember that putty defaults to an iso character set unless you change the 
defaults.

-- 
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20080220/d62d6ccf/attachment-0004.sig>