summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-12-23 15:25:05 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-12-23 15:25:05 +0100
commitd8d65c7536c2569854483cb8af7cdc94afea9b44 (patch)
tree5c178f30b88e2e88a4b9c2a5028950ebd38b6818 /tools.c
parent1bb58100b0de6ac7196d402b0f85d96f0c974af8 (diff)
downloadvdr-d8d65c7536c2569854483cb8af7cdc94afea9b44.tar.gz
vdr-d8d65c7536c2569854483cb8af7cdc94afea9b44.tar.bz2
Modified cCharSetConv so that it can be used to convert from "whatever VDR uses" to a given code
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c6
1 files changed, 3 insertions, 3 deletions
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;
}