From d8d65c7536c2569854483cb8af7cdc94afea9b44 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 23 Dec 2009 15:25:05 +0100 Subject: Modified cCharSetConv so that it can be used to convert from "whatever VDR uses" to a given code --- tools.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools.c') diff --git a/tools.c b/tools.c index 683dd080..39c17e2b 100644 --- a/tools.c +++ b/tools.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 2.5 2009/12/06 12:19:56 kls Exp $ + * $Id: tools.c 2.6 2009/12/23 15:12:15 kls Exp $ */ #include "tools.h" @@ -769,10 +769,10 @@ char *cCharSetConv::systemCharacterTable = NULL; cCharSetConv::cCharSetConv(const char *FromCode, const char *ToCode) { if (!FromCode) - FromCode = systemCharacterTable; + FromCode = systemCharacterTable ? systemCharacterTable : "UTF-8"; if (!ToCode) ToCode = "UTF-8"; - cd = (FromCode && ToCode) ? iconv_open(ToCode, FromCode) : (iconv_t)-1; + cd = iconv_open(ToCode, FromCode); result = NULL; length = 0; } -- cgit v1.2.3