All pastes #539609 Raw Edit

Anonymous

public c v1 · immutable
·published 2007-06-05 08:48 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>#include <locale.h>int main(int argc, char* argv[]){        unsigned long code = 0L;        if (argc < 2)        {                printf("Usage: chargen <hex code>\n");                return 1;        }        sscanf(argv[1], "%x", &code);        if (code == 0)        {                printf("Bad code\n");                return 2;        }        printf("Current locale: %s\n", setlocale(LC_ALL, NULL));        wprintf(L"%c\n", code);        return 0;}