summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2009-08-29 13:53:42 +0200
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2009-08-29 13:53:42 +0200
commit6c8c62e93c543fd940169da519e6528c47e54717 (patch)
tree19e2dcfdff52e7892096cb3510d6c2681f4045ed
parent41c2e71d91a2d42ba830ffce782dc7fd3e845560 (diff)
downloadvdr-plugin-epgsearch-6c8c62e93c543fd940169da519e6528c47e54717.tar.gz
vdr-plugin-epgsearch-6c8c62e93c543fd940169da519e6528c47e54717.tar.bz2
fix UTF8-character handling in timer filenames
-rw-r--r--HISTORY3
-rw-r--r--HISTORY.DE2
-rw-r--r--epgsearchext.c7
3 files changed, 9 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index 6ffaecb..ffec882 100644
--- a/HISTORY
+++ b/HISTORY
@@ -87,6 +87,9 @@ fixes:
- some fixes to compile with gcc-4.4, thanks to firefly@vdrportal for providing a patch
- fixed wrong man section of some man pages, thanks to Ville Skyttä for providing a patch
- some fixes regarding libtre includes, thanks to Ville Skyttä for providing a patch
+- fix UTF8-character handling in timer file names, thanks to Rolf Ahrenberg for providing
+ a patch
+
2008-04-29: Version 0.9.24
new:
diff --git a/HISTORY.DE b/HISTORY.DE
index 7495535..b701d43 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -91,6 +91,8 @@ fixes:
Patch.
- Falsche Man-Sektion einiger Man-Pages korrigiert, Danke an Ville Skyttä für den Patch.
- Einige Korrekturen bzgl. libtre-Includes, Danke an Ville Skyttä für den Patch.
+- Korrektur beim UTF8-Zeichensatz-Handling bei Timer-Filenamen, Danke an Rolf Ahrenberg für
+ den Patch.
2008-04-29: Version 0.9.24
diff --git a/epgsearchext.c b/epgsearchext.c
index 32e9c40..37be75a 100644
--- a/epgsearchext.c
+++ b/epgsearchext.c
@@ -628,15 +628,16 @@ char* cSearchExt::BuildFile(const cEvent* pEvent) const
return file;
const char *Subtitle = pEvent ? pEvent->ShortText() : NULL;
- char SubtitleBuffer[MAX_SUBTITLE_LENGTH];
+ char SubtitleBuffer[Utf8BufSize(MAX_SUBTITLE_LENGTH)];
if (isempty(Subtitle))
{
sprintf(SubtitleBuffer, "%s-%s", GETDATESTRING(pEvent), GETTIMESTRING(pEvent));
Subtitle = SubtitleBuffer;
}
- else if (strlen(Subtitle) > MAX_SUBTITLE_LENGTH)
+ else if (Utf8StrLen(Subtitle) > MAX_SUBTITLE_LENGTH)
{
- strn0cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH);
+ Utf8Strn0Cpy(SubtitleBuffer, Subtitle, sizeof(SubtitleBuffer));
+ SubtitleBuffer[Utf8SymChars(SubtitleBuffer, MAX_SUBTITLE_LENGTH)] = 0;
Subtitle = SubtitleBuffer;
}