Skip to content

Instantly share code, notes, and snippets.

@fourdollars
Created September 3, 2013 08:52
Show Gist options
  • Save fourdollars/6421318 to your computer and use it in GitHub Desktop.
Save fourdollars/6421318 to your computer and use it in GitHub Desktop.
A simple program to print 'Hello World' in Chinese.
#include <glib.h>
#include <locale.h>
// gcc -Wall -Werror -g hello.c `pkg-config --cflags --libs glib-2.0` -o hello
int main(int argc, char* argv[])
{
setlocale(LC_ALL, "en_US.utf8");
g_print ("哈囉世界\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment