aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index 8c035c6..71f2931 100644
--- a/degesch.c
+++ b/degesch.c
@@ -4497,8 +4497,9 @@ irc_get_or_make_user_buffer (struct server *s, const char *nickname)
// Open a new buffer for the user
buffer = buffer_new (s->ctx->input);
buffer->type = BUFFER_PM;
- // FIXME: this probably needs to be converted to UTF-8
- buffer->name = xstrdup_printf ("%s.%s", s->name, nickname);
+ char *nickname_utf8 = irc_to_utf8 (nickname);
+ buffer->name = xstrdup_printf ("%s.%s", s->name, nickname_utf8);
+ free (nickname_utf8);
buffer->server = s;
buffer->user = user;
str_map_set (&s->irc_buffer_map, user->nickname, buffer);
@@ -6645,8 +6646,9 @@ irc_handle_join (struct server *s, const struct irc_message *msg)
buffer = buffer_new (s->ctx->input);
buffer->type = BUFFER_CHANNEL;
- // FIXME: this probably needs to be converted to UTF-8
- buffer->name = xstrdup_printf ("%s.%s", s->name, channel_name);
+ char *channel_name_utf8 = irc_to_utf8 (channel_name);
+ buffer->name = xstrdup_printf ("%s.%s", s->name, channel_name_utf8);
+ free (channel_name_utf8);
buffer->server = s;
buffer->channel = channel =
irc_make_channel (s, xstrdup (channel_name));