#include <stdio.h>
#include <locale.h>
#include <stdlib.h>
 
int main(int argc, char **argv) {
    FILE    *fp;
    wchar_t *pwcs;
 
    setlocale(LC_ALL, "");

    /* Error Handling if fopen was not successful. */
    if((fp = fopen("file", "r")) == NULL) {
        /*  Error handler  */
    }else{
        /*  pwcs points to wide character buffer of BUFSIZ.  */
        while(fgetws(pwcs, BUFSIZ, fp) != (wchar_t *)NULL){
            /*
             *  pwcs contains wide characters with null
             *  termination.
             */
        }
    }
}