diff options
author | Arnavion <arnavion@gmail.com> | 2015-01-18 02:10:05 -0800 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2015-01-18 02:10:05 -0800 |
commit | 6f8a6e66ccf013e7afe46bd19580d9300047a9ea (patch) | |
tree | 267ad12f650c2f78f12b605780a7273251551d57 /src/common/server.c | |
parent | 5749c53484369515c4e6df4a4730b1f34fab82b4 (diff) |
Detect unknown server encodings and set to UTF-8.
Diffstat (limited to 'src/common/server.c')
-rw-r--r-- | src/common/server.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/server.c b/src/common/server.c index f9ca809e..d09f6c40 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -1657,6 +1657,12 @@ server_set_encoding (server *serv, char *new_encoding) g_free (serv->encoding); serv->encoding = g_strdup ("UTF-8"); } + + else if (!servlist_check_encoding (serv->encoding)) + { + g_free (serv->encoding); + serv->encoding = g_strdup ("UTF-8"); + } } else { |