views:

72

answers:

3

I realize this is very much of a long shot, but...

In shell scripts on Macs I can display an Apple character. Is there any way to display a Tux character (or anything else associated with Linux) on Linux systems?

The simplest solution would be if there's something in the Unicode set that symbolizes Linux, whether a Tux or something else. I haven't been able to find such a character through Googling, but maybe someone knows of one.

Another solution would be if there's some way (that I'm completely unaware of) to define characters on Linux, and display them in a terminal. (Seems impossible, but who knows? We used to do this on Commodore systems all the time!)

(I'm skipping the full backstory as to why this is useful, but the short version is that I'm looking for a way of displaying in as little space as possible what kind of system the script is running on, since I log into perhaps almost a hundred different servers, on different operating systems, and there are times a visual reminder would be very useful.)

If there does turn out to be a Unicode solution, I'll ask separate questions for Solaris and Windows. But this is a long shot, so no point in asking those right now.

+3  A: 

There's a penguin character in UNICODE. No font on my machine seems to be able to render it, but I'm using Linux, not MacOS, so your mileage may vary.

Frédéric Hamidi
@Frédéric Hamidi: who the hell proposed that symbol? Nice find, btw
Lie Ryan
@Lie, that symbol is part of the [Miscellaneous Symbols And Pictographs](http://www.fileformat.info/info/unicode/block/miscellaneous_symbols_and_pictographs/images.htm) block, which was probably proposed by someone who thought Wingdings wasn't going far enough.
Frédéric Hamidi
U+1F427 Penguin is one of the majority of symbols in this block that stem from the [emoji](http://en.wikipedia.org/wiki/Emoji), frivolous cutesy nonsense used by Japanese cellphones. The horror.
bobince
@bobince, [いやな感じ](http://blog.goo.ne.jp/denman/e/49a5df4dea615708e0919eeb6a3fa021).
Frédéric Hamidi
Curious! The SE widget in the corner showed what must have been the original version of your comment, making the 感じ/漢字 pun more obvious. :-) Either way those 絵文字 certainly are いやな code points. I'm all for having Unicode standardise communications, but at the same time I kind of wish they'd have fallen in a pit full of fire instead.
bobince
The emoji character names in Unicode 6.0 are a problem: they've collided with a name from Unicode 1.0, which were not normative but which in fact were used. The problem is the "BELL", which the C0 control codes used for code point 7, whose official name is now "<control>" along with many others. They should have named theemoji characters with a clarifying prefix the way they do for everything else. I don't know what we're going to do about this; it's something of a problem.
tchrist
+1  A: 

LUWM - Linux, Unix, Windows, Macs

no need to invent funny symbols

Lie Ryan
+2  A: 

The character that displays an Apple logo on Apple computers, ‹›, is code point 0xF0 in MacRoman. Despite appearances, MacRoman is not an Italian hamburger but rather an 8-bit legacy character set carried forward from Apple's pre-Unix days. The mapping tables for MacRoman to Unicode place MacRoman 0xF0 at Unicode U+F8FF, which is in the Private Use area. It has the Unicode regex properties \p{Co} (aka \p{Other}) and \p{InPrivateUse} (aka \p{Private_Use}). Its script type is unknown, corresponding to the Unicode property \p{Script=Unknown}, also known as \p{Unknown}, \p{Script=Zzzz} or \p{Zzzz}. Its only other general categories are \p{Graph} and \p{Print}.

Besides its own logo at the very end of the private use area, Apple has other private use characters: ‹› at U+F804 for an "eject" glyph, ‹› at U+F802 for a "pencil" glyph, and ‹› at U+F803 for a glyph of a pointer into a sunburst. These have no mapping into MacRoman.

There is nothing stopping a Linux system from grabbing some code point from the Private Use Area (which lies in plane 0 from U+E000 – U+F8FF), or from either of Supplementary Private Use Area A (plane 15: U+F0000 – U+FFFFD, or B (plane 16: U+100000 – U+10FFFD), and doing with it whatever it pleased.

These wouldn't be meaningful for interchange, but they could do it. It might even be fun to watch all the miscoded Java programs break on characters from up in the astral planes that are too big to fit into Java's (oxy)moronic char data type. ☺

In the very recently release Unicode 6.0, the controversial Emoji block does include code point U+1F427, PENGUIN. Scant few fonts yet support Unicode 6.0, but you can see what it looks like here on page 1256 of Unicode 6.0.

Being an astral character, it would also cause conniptions in all those programming languages and environments whose broken character abstractions misrepresent characters as 16-bit entities instead of abstract characters.

(Hm, do we have a definitive list of those, those that expose the user to physical encodings instead of presenting abstract characters? What else besides Java?)

So it's probably not a good idea except as an agent provocateur. Plus it doesn't really look all that much like Tux, anyway.

Personally, I really don't see the need to encode corporate logos as single code points. That's why we have GIFs and the like.

tchrist