title: Getting a Dev-C++ built program to output UNICODE characters to the Windows command line
body: <p>If you can answer any of my questions, that would be awesome.</p>
  
  <p>Here's the scoop: I'm teaching an intro to programming class in Thailand to 11th graders. It's been going great so far, their level of English is high enough that I can teach in English and have them write programs in English and everything is fine and dandy.</p>
  
  <p>However, as speakers of a language with non-Latin characters, I feel that they should at least learn what UNICODE is. I won't test them on it or bog them down with implementation details, but I want to show them an example of a UNICODE program that can do I/O with Thai characters.</p>
  
  <p>I'm operating under the following constraints, none of which can be changed (at least for this semester):</p>
  
  <ul>
  <li>The program must run on Windows 7</li>
  <li>The program must be in C (not C++)</li>
  <li>We must use Dev-C++ (v. 4.9.9.3) as our IDE (I'm going to try and convince the admins to change for next semester, but they may not want to)</li>
  <li>The program should output to the Command Line (I'd like it to "look like" the programs we've been writing so far)</li>
  <li>I want it to be easy to set up and run, though I'm not opposed to including a Batch file to do some setup work for the kids.</li>
  </ul>
  
  <p>Here's how far I've gotten, and the questions I have:</p>
  
  <ul>
  <li>In Control Panel > Regions > Administrative > Language for non-UNICODE programs is set to Thai.</li>
  <li>I used "chcp 874" to set the <a href="http://msdn.microsoft.com/en-us/goglobal/cc305142.aspx" rel="nofollow">Thai codepage</a> in the Command Line, but characters from the keyboard come appear as garbage characters. Is this maybe because the keyboard mappings are wrong or do I have to change something else?</li>
  <li>I wrote a program with the line: printf("\u0E01\n"); which prints ก, the first letter in the Thai alphabet. Is that the right syntax?</li>
  <li>I received a compiler warning that "Universal Characters are only supported in C++ and C99." Does Dev-C++ not compile to C99? Is there a way I could get a C99 compiler for it?</li>
  <li>I ran the code and got garbage characters. I imagine this could be because of the compiler, the command line, or any number of other things.</li>
  </ul>
  
  <p>I'd love to end this course with a program that outputs สวัสดีโลก, the Thai equivalent of "Hello World!" I've done tons of googling, but every answer I've found either doesn't work in this specific case or involved a different IDE.</p>