I have the same problem, but I tryed according to the next steps. First, create de file in an editor that can support UTF8, write some non ANSI simbols and save; then open the file in Dev c++, automatically the file is in UTF8. Now give ideas for the use of fputc, fprintf, fgetc, etc.