From 819e4b9f10a5012516175df6899d7c83d9a62b1d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 13 Jan 2008 14:05:26 +0100 Subject: [PATCH] Fixed displaying weekday names in the Schedule menu if the system uses UTF-8 --- CONTRIBUTORS | 4 ++++ HISTORY | 2 ++ menu.c | 7 ++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e2555254..f703555c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2251,3 +2251,7 @@ Mario Ivankovits István Füley for translating OSD texts to the Hungarian language + +Jiri Dobry + for reporting a bug in displaying weekday names in the Schedule menu if the system + uses UTF-8 diff --git a/HISTORY b/HISTORY index db131d8a..446599da 100644 --- a/HISTORY +++ b/HISTORY @@ -5554,3 +5554,5 @@ Video Disk Recorder Revision History programmer to write 'a || (b && c)', while everybody knows that '&&' links stronger than '||' (reported by Tobias Grimm). - Updated the Hungarian language texts (thanks to István Füley). +- Fixed displaying weekday names in the Schedule menu if the system uses UTF-8 + (reported by Jiri Dobry). diff --git a/menu.c b/menu.c index 93fe2581..b7ecf2a5 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.468 2008/01/13 12:43:09 kls Exp $ + * $Id: menu.c 1.469 2008/01/13 13:59:33 kls Exp $ */ #include "menu.h" @@ -1059,12 +1059,13 @@ bool cMenuScheduleItem::Update(bool Force) char v = event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' '; char r = event->SeenWithin(30) && event->IsRunning() ? '*' : ' '; const char *csn = channel ? channel->ShortName(true) : NULL; + cString eds = event->GetDateString(); if (channel && withDate) - asprintf(&buffer, "%d\t%.*s\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 6), csn, 6, *event->GetDateString(), *event->GetTimeString(), t, v, r, event->Title()); + asprintf(&buffer, "%d\t%.*s\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 6), csn, Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title()); else if (channel) asprintf(&buffer, "%d\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 6), csn, *event->GetTimeString(), t, v, r, event->Title()); else - asprintf(&buffer, "%.*s\t%s\t%c%c%c\t%s", 6, *event->GetDateString(), *event->GetTimeString(), t, v, r, event->Title()); + asprintf(&buffer, "%.*s\t%s\t%c%c%c\t%s", Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title()); SetText(buffer, false); result = true; }