title: How to convert UNICODE / UTF-8 to GB2312 in C
body: <p>I'm searching for a method to convert a two Byte UNICODE <strong>or</strong> a variable (1-3 Byte) UTF-8 string to Chinese Simplified (GB2312). I found a lot of methods for php, Java, C# and Windows but nothing for standard "C".</p>
  
  <p>Right now, my best solution is to translate this JavaScript example:
  <a href="https://gist.github.com/19317362/a1d8e40bfb6587463d4d" rel="nofollow noreferrer">https://gist.github.com/19317362/a1d8e40bfb6587463d4d</a></p>
  
  <p>Thanks in advance!</p>