Oct 16, '02 10:00:54AM • Contributed by: gunnm27
The fix is to run the ls -v instead of just ls command to "force unedited printing of non-graphic characters." Check the man page for ls for more information.
|
|
|
Force Unicode support in Terminl directory listings
Oct 16, '02 10:00:54AM • Contributed by: gunnm27
OSX's Unicode support allows for various languages to be used in the system. The Finder is able to display international languages with no problems. However, viewing files with non-English filenames in the Terminal results in a bunch of ?'s as file names instead of the actual filename.
The fix is to run the ls -v instead of just ls command to "force unedited printing of non-graphic characters." Check the man page for ls for more information.
•
[3,250 views]
Hint Options
Don't Work
I tried with a floder names ToñoáéÃóú
Don't Work
I believe that you should configure the terminal to to display UTF, as the default encoding would have trouble displaying unicode. I am not in front of my Mac, so I can't tell you where in there preferences it is.
don't work with fink ls
the tip works perfectly with the buildin ls-command and german umlauts for me.
Yes, but...
Nice tip, the Terminal displayed Option-8's perfectly for me. But the question still is, how do you actually enter those characters, that is, how do you tell cd what ls -v shows you?
Yes, but...
If I have a directory with special characters, e.g.
•downloads I just do this: % cd *loads The leading bullet is used to prevent Retrospect from backing up the folder.
re: Yes, but...
problem is if you have two similarly named files. Just last night, i ended up with two directories, one ending in ç, one ending in č (that's c with a hacek). (This is due to itunes's "Keep music folder organized" along with Serbian band names.) Otherwise the names were the same. Tab-completion didn't help, couldn't type EITHER one (can't even type a ç??? that's in iso-latin-1, isn't it?), couldn't even copy/paste it. I had to go to the finder & rename one of them before i could even cd into either one.
Quite an annoying speed bump. You'd think if the Terminal could display something, you'd be able to type it, or at least copy & paste it. peter
re: Yes, but...
oddly enough, if i changed the character set encoding (File > Show Info > Display) to Western (Mac OS Roman) I was able to type an option-8 bullet, whereas in Unicode option-8 would produce the strange question mark symbols. Western encoding wouldn't let me type ç or é or any of those character variations though, whereas Unicode will.
re: Yes, but...
>two directories, one ending in ç, one ending in
With Japanese it gets even stranger...
I just ran a calendar app with a Japanese name. Then when running top in the Terminal the Japanese name was displayed properly. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|