title: Reading and printing out Unicode and UTF-8 encodings in C
body: <p>I'm using Windows XP.<br>
  I want to read from files in ASCII, UTF-8 and Unicode encodings and print out strings on stdout.<br>
  I was trying to use functions from wchar.h like <strong>fgetwc()/fputwc()</strong> and <strong>fgetws()/fputws</strong>(), they work on ASCII but not when a file is in UTF-8 or Unicode. Doesn't print out language specific characters and when a file is in Unicode it doesn't print out anything but the box and first letter.<br>
  Is there any way of making a program in pure C that will read files, compare strings and print them out correctly on stdout regardless of the encoding of the files fed to the program?</p>