Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Mix ANSI colors, screen and encodings in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mix ANSI colors, screen and encodings in Terminal
Authored by: atverd on Aug 27, '04 01:48:49PM

It's not related directly to terminal encoding - I think you need to setup locale to make ls display accented characters. There is not much info about this in OS X man pages, but there is plenty of docs on internet for linux and mostly all these things applicable to OS X too. In short - you need to find your locale in /usr/share/locale and try to call ls like this (example):

LC_ALL=fr_BE.UTF-8 ls -l

This means french, belgian variant, output encoding is UTF-8. LC_ALL is environment variable which specifying your locale and you may assign it in .bashrc f.e. or .bash_profile in your home directory to make it default.



[ Reply to This | # ]
Mix ANSI colors, screen and encodings in Terminal
Authored by: astack on Aug 27, '04 04:52:49PM

Okay, thanks, this is interesting. When I set the environmental variable to say, fr_FR.UTF-8, ls -la now shows the months that the file was created in French (with appropriate accents on the characters), but my filenames with accented characters still don't appear properly. It doesn't matter if I create the file from the gui (aqua) or I do it from the command line, the accents appear as e??i??, etc.



[ Reply to This | # ]
Mix ANSI colors, screen and encodings in Terminal
Authored by: astack on Aug 27, '04 05:02:23PM

Oh duh. Type "ls -v" to properly render accented characters.



[ Reply to This | # ]
specific encoding?
Authored by: clytie on Aug 29, '04 12:17:32AM

Thanks very much for the hints. :)

I, too, am trying to live between MacOSX's "full Unicode support" and the realities, especially in applications, even those default with OSX.

I'm also very new to CLI, so please excuse dumb questions.

I need to be able to set up Terminal etc. to display Vietnamese, which is Unicode (one of the default Unicode keyboards with the system), language id "vi".

Do I just plug "vi" into your command, or do I need to say it twice? <muddled>

Much appreciation for any help offered <she says earnestly from within a thick fog>

from Clytie

---
Clytie Siddall -- Renmark, in the Riverland of South Australia

iBook G3, 10.3.5, all updates current



[ Reply to This | # ]
specific encoding?
Authored by: atverd on Aug 29, '04 01:19:32AM

I wish I could help you, but this is way too different from languages I have an experience with. The best way for you would be search on google for your language specific info, keywords "vietnamese locale mac os x". There are always "small" details and I'm pretty sure there are ready recipes made by native guys who know what they are talking about. One hint though, make sure there are directories starting with "vi" in /usr/share/locale on your mac. If not - don't bother, you'll need to find way to install needed locales to your system. On my system there are no such locales. If there are try them all - probably there will be "vi" and "vi_VI" at least.
Sorry, that's all :)



[ Reply to This | # ]