tServer and all clients should now support the A_UTF8 ability. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit fcd5abf4210e5a4013925f1dd3dd02b20c61f6da
(DIR) parent 10a9a791c84ea9276cb2f1ddbcc25b4e1c5247b7
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Mon, 5 Aug 2002 11:39:09 +0000
Server and all clients should now support the A_UTF8 ability.
Diffstat:
M ChangeLog | 6 ++++++
M TODO | 2 --
M src/AIPlayer.c | 3 +++
M src/curses_client/curses_client.c | 3 +++
M src/serverside.c | 1 +
5 files changed, 13 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/ChangeLog b/ChangeLog
t@@ -4,6 +4,12 @@ cvs
a non-default IP address
- BankInterest and DebtInterest variables added, to allow the
configuration of interest rates (with thanks to Matt)
+ - New "UTF8" ability added; if client and server share this ability, then
+ all network messages will be sent in UTF-8 (Unicode) encoding (without
+ the ability, all messages are assumed to be in your locale's default
+ codeset, which may cause problems on non-US ASCII systems)
+ - Encoding config variable added, to allow the config file's encoding
+ (usually taken from the locale) to be overridden
1.5.7 25-06-2002
- Sound support; Windows multimedia, ESD and SDL outputs are supported;
(DIR) diff --git a/TODO b/TODO
t@@ -1,5 +1,3 @@
-- Proper support for UTF-8 network messages and configuration files (e.g
- a "UTF8" variable in the configuration file, and a "utf8" network ability)
- Support for "proper" game dates, e.g. mm-dd-yy or dd-mm-yy
- Add support for reading/writing multiple configuration files to GUI client's
Options dialog
(DIR) diff --git a/src/AIPlayer.c b/src/AIPlayer.c
t@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <errno.h>
#include <glib.h>
+#include "configfile.h"
#include "dopewars.h"
#include "message.h"
#include "nls.h"
t@@ -143,6 +144,8 @@ void AIPlayerLoop()
NBSocksStatus oldsocks;
NetworkBuffer *netbuf;
+ ConvertConfigFile();
+
errstr = g_string_new("");
AIPlay = g_new(Player, 1);
(DIR) diff --git a/src/curses_client/curses_client.c b/src/curses_client/curses_client.c
t@@ -34,6 +34,7 @@
#include <signal.h>
#include <errno.h>
#include <glib.h>
+#include "configfile.h"
#include "curses_client.h"
#include "cursesport/cursesport.h"
#include "dopewars.h"
t@@ -2425,6 +2426,8 @@ void CursesLoop(void)
if (!CheckHighScoreFileConfig())
return;
+ ConvertConfigFile();
+
/* Save the configuration, so we can restore those elements that get
* overwritten when we connect to a dopewars server */
BackupConfig();
(DIR) diff --git a/src/serverside.c b/src/serverside.c
t@@ -829,6 +829,7 @@ static gboolean StartServer(void)
Scanner->msg_handler = ScannerErrorHandler;
Scanner->input_name = "(stdin)";
CreatePidFile();
+ ConvertConfigFile();
/* Make the output line-buffered, so that the log file (if used) is
* updated regularly */