views:

324

answers:

2

i wanted to create some shellscripts that display pretty ansi colored graphics for osx but unfortunately i find just very little information about that topic.

  1. osx seems to use monaco 10 as its default console font. is there some way to find out all displayable characters for this font?
  2. osx terminal runs in UTF-8 per default as far as i found out (can somebody confirm this?)
  3. is there a way to show or enter the extended ascii characters on osx (how it was done on windows/dos with alt gr+entering the digits)

thanks!

+1  A: 

Extended chars ar usually hused thorugh option+character key and shift+option+character key. I beleive terminal is utf-8 by default. Monaco should support the compelete character map. If you open up FontBook you can gain access to the char map there.

Additionally you can customize a lot of this type of thing from the preferences pane for terminal.

prodigitalson
thank - i knew about the character map, but i wanted to see all the characters that could be printed by the Monaco (default) font. not all fonts of the character map can actually be printed
z3cko
A: 

In Bash, you should be able to do:

for i in {32..255}; do printf "$i "\\$(($i/64*100+$i%64/8*10+$i%8))"\n"; done | column

to get a table of ASCII characters.

Dennis Williamson
thanks for that piece of code! unfortunately this just displays the "normal" ascii range and not the extended ascii range/chars
z3cko
@z3cko: "Extended" ASCII is between 128 and 255. If you're talking about characters other than that (and 0-127) then you're talking about multibyte characters which means your talking about Unicode.
Dennis Williamson
you are right, sorry about my confusion. i marked the question as answered by you because that's what you actually did ;) thanks
z3cko