Fix corruption of non-ASCII characters in banners.
I hardcoded the locale to en_US.UTF-8 since it might get passed wrong, and it's a reasonable value on public servers. (Adam Borowski <kilobyte@angband.pl>) git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@596 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
514e8808a9
commit
70fd9c005b
12
configure.ac
12
configure.ac
|
@ -70,18 +70,18 @@ fi
|
|||
AC_SUBST(MKDEP)
|
||||
AC_SUBST(MKDEP_DIRECT)
|
||||
|
||||
AC_SEARCH_LIBS(use_default_colors, [ncurses],
|
||||
AC_SEARCH_LIBS(use_default_colors, [ncursesw],
|
||||
[
|
||||
AC_MSG_RESULT([Using ncurses and color.])
|
||||
AC_DEFINE(USE_NCURSES_COLOR,1,[Use ncurses and color])
|
||||
AC_MSG_RESULT([Using ncursesw and color.])
|
||||
AC_DEFINE(USE_NCURSES_COLOR,1,[Use ncursesw and color])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([Not using ncurses, not using color.])
|
||||
AC_MSG_RESULT([Not using ncursesw, not using color.])
|
||||
])
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_SEARCH_LIBS(initscr, [ncurses curses], [], [
|
||||
AC_MSG_ERROR([Cannot find curses or ncurses devel libs.])
|
||||
AC_SEARCH_LIBS(initscr, [ncursesw cursesw], [], [
|
||||
AC_MSG_ERROR([Cannot find cursesw or ncursesw devel libs.])
|
||||
])
|
||||
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#include <libgen.h>
|
||||
#include <stdlib.h>
|
||||
#include <curses.h>
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef USE_SQLITE3
|
||||
# include <sqlite3.h>
|
||||
|
@ -2596,6 +2597,8 @@ main (int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
setlocale(LC_CTYPE, "en_US.UTF-8");
|
||||
|
||||
if (wall_email_str) {
|
||||
char *emailfrom = wall_email_str;
|
||||
char *emailmsg = strchr(wall_email_str, ':');
|
||||
|
|
Loading…
Reference in New Issue