title: What's the use of universal characters on POSIX system?
body: <p>In C one can pass unicode characters to printf() like this:</p>
  
  <pre><code>printf("some unicode char: %c\n", "\u00B1");
  </code></pre>
  
  <p>But the problem is that on POSIX compliant systems `char' is always 8 bits and most of UTF-8 character such as the above are wider and don't fit into char and as the result nothing is printed on the terminal. I can do this to achieve this effect however:</p>
  
  <pre><code>printf("some unicode char: %s\n", "\u00B1");
  </code></pre>
  
  <p>%s placeholder is expanded automatically and a unicode character is printed on the terminal. Also, in a standard it says:</p>
  
  <blockquote>
    <p>If the hexadecimal value for a universal character name is less than
    0x20 or in the range 0x7F-0x9F (inclusive), or if the universal
    character name designates a character in the basic source character
    set, then the program is illformed.</p>
  </blockquote>
  
  <p>When I do this:</p>
  
  <pre><code>printf("letter a: %c\n", "\u0061");
  </code></pre>
  
  <p>gcc says:</p>
  
  <blockquote>
    <p>error: \u0061 is not a valid universal character</p>
  </blockquote>
  
  <p>So this technique is also unusable for printing ASCII characters. In this article on Wikipedia <a href="http://en.wikipedia.org/wiki/Character_(computing)#cite_ref-3" rel="nofollow">http://en.wikipedia.org/wiki/Character_(computing)#cite_ref-3</a> it says:</p>
  
  <blockquote>
    <p>A char in the C programming language is a data type with the size of
    exactly one byte, which in turn is defined to be large enough to
    contain any member of the basic execution character set and UTF-8 code
    units.</p>
  </blockquote>
  
  <p>But is this doable on POSIX systems?</p>