From d36bd3abcf3b45165cb52ac256a6a29f073eb10a Mon Sep 17 00:00:00 2001 From: Niels Elburg Date: Wed, 26 Jan 2005 18:04:57 +0000 Subject: [PATCH] xml character encoding fix git-svn-id: svn://code.dyne.org/veejay/trunk@157 eb8d1916-c9e9-0310-b8de-cf0c9472ead5 --- veejay-current/libsample/sampleadm.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/veejay-current/libsample/sampleadm.c b/veejay-current/libsample/sampleadm.c index 92ea7222..bdc76d84 100644 --- a/veejay-current/libsample/sampleadm.c +++ b/veejay-current/libsample/sampleadm.c @@ -1,7 +1,7 @@ /* * Linux VeeJay * - * Copyright(C)2002 Niels Elburg + * Copyright(C)2002 Niels Elburg / * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -1884,10 +1884,11 @@ unsigned char *UTF8toLAT1(unsigned char *in) return (NULL); } - if (UTF8Toisolat1(out, &out_size, in, &in_size) != 0) { - fprintf(stderr, "Cannot convert %s\n", in); - free(out); - return (NULL); + if (UTF8Toisolat1(out, &out_size, in, &in_size) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot convert '%s'", in ); + free(out); + return (NULL); } out = realloc(out, out_size + 1); @@ -2578,6 +2579,7 @@ void CreateClip(xmlNodePtr node, clip_info * clip) int clip_writeToFile(char *clipFile) { int i; + char *encoding = "UTF-8"; clip_info *next_clip; xmlDocPtr doc; xmlNodePtr rootnode, childnode; @@ -2595,8 +2597,8 @@ int clip_writeToFile(char *clipFile) CreateClip(childnode, next_clip); } } - xmlSaveFormatFile(clipFile, doc, 1); - + //xmlSaveFormatFile(clipFile, doc, 1); + xmlSaveFormatFileEnc( clipFile, doc, encoding, 1 ); xmlFreeDoc(doc); return 1;