--- lbbs/src/main.c 2025/11/07 04:58:09 1.72 +++ lbbs/src/main.c 2025/11/11 00:28:05 1.74 @@ -6,6 +6,10 @@ * Copyright (C) 2004-2025 Leaflet */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "bbs.h" #include "bwf.h" #include "common.h" @@ -19,6 +23,7 @@ #include "user_list.h" #include #include +#include #include #include #include @@ -133,6 +138,13 @@ int main(int argc, char *argv[]) return -1; } + // Apply the specified locale + if (setlocale(LC_ALL, "en_US.UTF-8") == NULL) + { + fprintf(stderr, "setlocale(LC_ALL, en_US.UTF-8) error\n"); + return -1; + } + // Initialize log if (log_begin(LOG_FILE_INFO, LOG_FILE_ERROR) < 0) {