# HG changeset patch # User Mikael Berthe # Date 1143306877 -3600 # Node ID e25b8a348ebd0f20e663faae9215cad1a8d386d1 # Parent 464be13343a9cfdc84a9c003fa819c477797d400 Screen updating functions use UTF-8 scr_DrawRoster(), scr_UpdateMainStatus(), scr_UpdateChatStatus() and scr_WriteInWindow() expect UTF-8 data. diff -r 464be13343a9 -r e25b8a348ebd mcabber/src/screen.c --- a/mcabber/src/screen.c Sat Mar 25 18:10:36 2006 +0100 +++ b/mcabber/src/screen.c Sat Mar 25 18:14:37 2006 +0100 @@ -635,7 +635,7 @@ // Redraw the main (bottom) status line. void scr_UpdateMainStatus(int forceupdate) { - const char *sm = jb_getstatusmsg(); + char *sm = from_utf8(jb_getstatusmsg()); werase(mainstatusWnd); mvwprintw(mainstatusWnd, 0, 0, "%c[%c] %s", @@ -646,6 +646,7 @@ update_panels(); doupdate(); } + g_free(sm); } // scr_DrawMainWindow() @@ -833,7 +834,7 @@ const char *fullname; const char *msg = NULL; char status; - char *buf; + char *buf, *buf_locale; // Usually we need to update the bottom status line too, // at least to refresh the pending message flag. @@ -852,7 +853,9 @@ wprintw(chatstatusWnd, "~"); if (isgrp) { - mvwprintw(chatstatusWnd, 0, 5, "Group: %s", fullname); + buf_locale = from_utf8(fullname); + mvwprintw(chatstatusWnd, 0, 5, "Group: %s", buf_locale); + g_free(buf_locale); if (forceupdate) { update_panels(); doupdate(); @@ -887,7 +890,9 @@ buf = g_strdup_printf("[%c] Buddy: %s -- %s", status, fullname, msg); replace_nl_with_dots(buf); - mvwprintw(chatstatusWnd, 0, 1, "%s", buf); + buf_locale = from_utf8(buf); + mvwprintw(chatstatusWnd, 0, 1, "%s", buf_locale); + g_free(buf_locale); g_free(buf); if (forceupdate) { @@ -970,6 +975,7 @@ for (i=0; i