OVERVIEW lit is a utility written in C which takes as argument numbers in decimal , hexadecimal , binary or octal and emits either the corresponding bytes to stdout or it can be made to consider the bytes as Unicode code points and emits to stdout the bytes corresponding to the UTF-8 representation of the code point. DOWNLOAD , COMPILATION , INSTALLATION Since this is only one file of C source there's no tar package. You just save the file with a .c extension (I use a .txt extension on the web to prevent web browsers from trying to open it with a different programme) and you compile it. It requires a compiler which supports the 1999 C standard or later but otherwise it doesn't have anything specific to some operating system. But I have only tested it on Linux. So if for example you have saved it as literal.c then you compile like cc literal.c -o lit .With gcc you do gcc -std=c99 -Wall literal.c -o lit INSTRUCTIONS I haven't written a man page because the utility is so simple. You use it like lit [-d] [-h] [arg1] [arg2] ... Each arg can have one of the following forms : 1. If it starts with l (letter l) then it just prints the remainder of the argument as is. For example lit lABC prints ABC . lit lABC lDEF lGH prints ABCDEFGH . 2. If the argument starts with u then the rest of the argument is taken to represent a Unicode code point. Actually the utility does not check that it's a valid code point , it simply checks that the number is <= 7FFFFFFF (hex) and applies the algorithm which appears in RFC 2279 (on a Linux system at least , man utf-8 gives the same algorithm). It should be noted that RFC 2279 has been obsoleted by RFC 3629 which limits the range of values from 1 to 10FFFF (hex). But I think it's convenient supporting the wider range because it allows for experimentation and possible extensions. After the "u" follows the number denoting the code point ; the number has the same format as described in the next step. 3. A number has an optional suffix of h , d , o , b for hexadecimal , decimal , octal , binary , respectively. Without a suffix then decimal is assumed. So for example lit 45 55h 77o 10001010b 77d will emit on stdout the octets with values (in decimal) 45 , 85 , 63 , 138 , 77. In a hexadecimal number , values 10-16 (decimal) can be given using the characters a-f or A-F but the utility will signal an error if in the same argument you have both upper case and lower case letters. The rationale behind this design decision is that some may prefer upper case letters and some may prefer lower case but if some argument has both then probably something was mistyped rather than the user preferring it this way. In any case , if you don't like the behaviour then modifying the source code to eliminate it is easy. If the -h option is given then instead of emitting the octets the utility will emit the values of the octets in hexadecimal. So lit -h 45 55h 77o 10001010b 77d will print 2D 55 3F 8A 4D .This is similar as writing lit 45 55h 77o 10001010b 77d | od -A n -t x1 where od is the standard Unix utility. The -d option is analogous but prints the octet values in decimal. If both -h and -d are given on the command line then the latest appearance takes effect. Note that the utility without the -h or -d option does not emit a newline at the end of its output ; if you want this then you have to give as last argument 10 or perhaps as last two arguments 13 10 , whatever is appropriate for your operating system. Here are some examples : lit u3a3h u3A3h u931 u931d u1110100011b u1643o CEh a3h 206 10100011b 12o will print the Greek upper case sigma 8 times followed by a newline character (assuming you run it on a terminal emulator which understands UTF-8 (xterm has such a mode but is not the only one) and you have Greek fonts). The Unicode code point for Greek upper case sigma is 3A3 (hex) and 3A3 (hex) = 931 (decimal) = 1110100011 (binary) = 1643 (octal) .This explains the first 6 arguments. The next 4 arguments specify the UTF-8 octets individually instead of giving the code point. So if you do lit -h u3A3h or lit -h u1110100011b or lit -h u931 etc. it will tell you that the octets are CE (hex) and A3 (hex). So the 2 arguments CEh a3h emit these octets (specifying the numbers in hexadecimal) and the arguments 206 10100011b do the same specifying the numbers in decimal and binary. Finally , 12o gives newline in octal. lit u3a3h u3A3h u931 l=, u931d u1110100011b u1643o l,= CEh a3h 206 10100011b 12o will put a "=," after the first 3 sigmas and then a ",=" after the next 3. lit u3a3h | iconv -f UTF-8 -t ISO_8859-7 | od -A n -t x1 This example uses the standard Unix utilities iconv and od .It will output d3 which is the hex value in ISO/IEC 8859-7 encoding for the Greek upper case sigma. Note that there are plenty of Unicode code points which cannot be represented in 8859-7 but Greek sigma can. Note also that , although iconv is standard , exactly which encodings it supports and the precise formats you have to give to the -f and -t options is implemen- tation dependent ; the above invocation of iconv works on Linux. If your terminal emulator has a 8859-7 mode then putting it in that mode and doing lit u3a3h | iconv -f UTF-8 -t ISO_8859-7 will output a Greek upper case sigma. LICENSE You are free to do anything you want with the code and documentation a.k.a. public domain. CONTACT For bug reports or comments my email {written backwards} is moc.liamg@uobips Spiros Bousbouras September 2017