# # patch "ChangeLog" # from [f5dab99679780f45758170f2d4ab633df1fcd9e4] # to [0d0d192fb860b82bf2e1dbcd49ab0c66083de496] # # patch "ui.cc" # from [cc03687f663ce5479070baa73a9c793ac16b1761] # to [0fa61fa5c584e05a187d6c7e29c8336e4d7f3455] # ======================================================================== --- ChangeLog f5dab99679780f45758170f2d4ab633df1fcd9e4 +++ ChangeLog 0d0d192fb860b82bf2e1dbcd49ab0c66083de496 @@ -1,5 +1,9 @@ 2005-09-25 Matt Johnston + * ui.cc: fallback to the default locale if locale("") fails. + +2005-09-25 Matt Johnston + * botan/arc4.cpp: increase maximum keylength to 256 bytes. 2005-09-24 Satoru SATOH ======================================================================== --- ui.cc cc03687f663ce5479070baa73a9c793ac16b1761 +++ ui.cc 0fa61fa5c584e05a187d6c7e29c8336e4d7f3455 @@ -380,10 +380,23 @@ return w; } -// a cache used to avoid initialising locale("") on every call to boost::format const locale & get_user_locale() { - static const locale user_locale(""); + // this is awkward because if LC_CTYPE is set to something the + // runtime doesn't know about, it will fail. in that case, + // the default will have to do. + static bool init = false; + static locale user_locale; + if (!init) + { + init = true; + try + { + user_locale = locale(""); + } + catch( ... ) + {} + } return user_locale; }