Convey locale-related environment variables as backup, and nicer error.

Fixes #74.
This commit is contained in:
Keith Winstein
2012-04-14 16:39:07 -04:00
parent 597756b846
commit 8f60f7ab05
10 changed files with 114 additions and 15 deletions
+6 -1
View File
@@ -49,7 +49,12 @@
void STMClient::init( void )
{
assert_utf8_locale();
if ( !is_utf8_locale() ) {
fprintf( stderr, "mosh-client needs a UTF-8 native locale to run.\n\n" );
fprintf( stderr, "Unfortunately, the locale environment variables currently specify\nthe character set \"%s\".\n\n", locale_charset() );
int unused __attribute((unused)) = system( "locale" );
exit( 1 );
}
/* Verify terminal configuration */
if ( tcgetattr( STDIN_FILENO, &saved_termios ) < 0 ) {