Getting a Dev-C++ built program to output UNICODE characters to the Windows command line -


if can answer of questions, awesome.

here's scoop: i'm teaching intro programming class in thailand 11th graders. it's been going great far, level of english high enough can teach in english , have them write programs in english , fine , dandy.

however, speakers of language non-latin characters, feel should @ least learn unicode is. won't test them on or bog them down implementation details, want show them example of unicode program can i/o thai characters.

i'm operating under following constraints, none of can changed (at least semester):

  • the program must run on windows 7
  • the program must in c (not c++)
  • we must use dev-c++ (v. 4.9.9.3) our ide (i'm going try , convince admins change next semester, may not want to)
  • the program should output command line (i'd "look like" programs we've been writing far)
  • i want easy set , run, though i'm not opposed including batch file setup work kids.

here's how far i've gotten, , questions have:

  • in control panel > regions > administrative > language non-unicode programs set thai.
  • i used "chcp 874" set thai codepage in command line, characters keyboard come appear garbage characters. maybe because keyboard mappings wrong or have change else?
  • i wrote program line: printf("\u0e01\n"); prints ก, first letter in thai alphabet. right syntax?
  • i received compiler warning "universal characters supported in c++ , c99." dev-c++ not compile c99? there way c99 compiler it?
  • i ran code , got garbage characters. imagine because of compiler, command line, or number of other things.

i'd love end course program outputs สวัสดีโลก, thai equivalent of "hello world!" i've done tons of googling, every answer i've found either doesn't work in specific case or involved different ide.

i have never used dev-c++ ide :-) however, after reading on bit see dev-c++ version 4.9.9.3 uses gcc-3.5.4 mingw port. has universal character support status of "done" see http://gcc.gnu.org/gcc-3.4/c99status.html details. have change ide configuration such compiler uses -std=c99 part of compiler flags.

hopefully trick.

i try fiddle on own system , see how far can get. update answer if find more clues :-)


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -