# # patch "ChangeLog" # from [ac164deba6ffd37e39c26a2374db06cf609c46f1] # to [d365571f6f5f41f1207361b820240e68e390f89d] # # patch "monotone.cc" # from [a9cbddd5b52d8d0449f17a1032fd4744194d702f] # to [ac2727c294f77b9bf31b64aef134e3f71ed012c0] # ======================================================================== --- ChangeLog ac164deba6ffd37e39c26a2374db06cf609c46f1 +++ ChangeLog d365571f6f5f41f1207361b820240e68e390f89d @@ -1,5 +1,10 @@ 2005-08-23 Nathaniel Smith + * monotone.cc (cpp_main): Trick popt into converting its generated + help messages into the current locale's charset. + +2005-08-23 Nathaniel Smith + * ui.cc (inform, sanitize): Convert all output from utf8 to current locale's charset. ======================================================================== --- monotone.cc a9cbddd5b52d8d0449f17a1032fd4744194d702f +++ monotone.cc ac2727c294f77b9bf31b64aef134e3f71ed012c0 @@ -238,7 +238,8 @@ setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - bind_textdomain_codeset(PACKAGE, "UTF-8"); + const char * default_textdomain_codeset + = bind_textdomain_codeset(PACKAGE, "UTF-8"); // we want to catch any early informative_failures due to charset // conversion etc @@ -528,7 +529,12 @@ L(F("Added 'hidden' to option # %d\n") % options[0].argInfo); } + // switch gettext() back to returning native charset strings, since popt + // will simply dump whatever gettext() returns + bind_textdomain_codeset(PACKAGE, default_textdomain_codeset); poptPrintHelp(ctx(), stdout, 0); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + cout << endl; commands::explain_usage(u.which, cout); clean_shutdown = true;