X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fmain.cc;h=a422563d72d9e9cb504816598349be50ca9e5241;hb=95a11f35534a866514f9b8e9f5e929452c5df23a;hp=1311ce51df59c32357ad8e5372172577939eff08;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/main.cc b/src/main.cc index 1311ce51..a422563d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -13,6 +13,10 @@ extern "C" { # include #endif // HAVE_LOCALE_H +#ifdef HAVE_STDIO_H +# include +#endif // HAVE_STDIO_H + #include "gettext.h" } @@ -20,8 +24,10 @@ extern "C" { int main(int argc, char **argv) { // initialize the locale - setlocale(LC_ALL, ""); + if (!setlocale(LC_ALL, "")) + printf("Couldn't set locale from environment.\n"); bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); ob::Openbox openbox(argc, argv);