# # patch "ChangeLog" # from [80affb99d4bbd633fa4e4422fce5f361c5a22408] # to [ac164deba6ffd37e39c26a2374db06cf609c46f1] # # patch "ui.cc" # from [8a0a92bd8c2ebd3725be8f5e60169e099c18e781] # to [b299e2428530c816ad7bc8e3cf1728f40b7cf5b3] # ======================================================================== --- ChangeLog 80affb99d4bbd633fa4e4422fce5f361c5a22408 +++ ChangeLog ac164deba6ffd37e39c26a2374db06cf609c46f1 @@ -1,5 +1,10 @@ 2005-08-23 Nathaniel Smith + * ui.cc (inform, sanitize): Convert all output from utf8 to + current locale's charset. + +2005-08-23 Nathaniel Smith + * monotone.cc (cpp_main): Use bind_textdomain_codeset to request that all gettext'ed strings be returned in UTF-8. ======================================================================== --- ui.cc 8a0a92bd8c2ebd3725be8f5e60169e099c18e781 +++ ui.cc b299e2428530c816ad7bc8e3cf1728f40b7cf5b3 @@ -331,9 +331,7 @@ static inline string sanitize(string const & line) { - // FIXME: you might want to adjust this if you're using a charset - // which has safe values in the sub-0x20 range. ASCII, UTF-8, - // and most ISO8859-x sets do not. + // UTF-8 does not have safe values in the sub-0x20 range. string tmp; tmp.reserve(line.size()); for (size_t i = 0; i < line.size(); ++i) @@ -365,7 +363,9 @@ string prefixedLine; prefix_lines_with(_("monotone: "), line, prefixedLine); ensure_clean_line(); - clog << sanitize(prefixedLine) << endl; + external localized_text; + utf8_to_system(utf8(sanitize(prefixedLine)), localized_text); + clog << localized_text << endl; clog.flush(); }