X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fcharset-converter.cpp;h=8ff11452c7d93977f9c66bd83a25895b9ace198a;hb=d119ba229b6c9257c4efb634bf7425d6595196ff;hp=04457082669206366ea972760842321e857d0ef1;hpb=d7f41f16caf965adb1a5ffcdaa937787dfcc030a;p=yazproxy-moved-to-github.git diff --git a/src/charset-converter.cpp b/src/charset-converter.cpp index 0445708..8ff1145 100644 --- a/src/charset-converter.cpp +++ b/src/charset-converter.cpp @@ -1,7 +1,7 @@ -/* $Id: charset-converter.cpp,v 1.4 2005-06-25 15:58:33 adam Exp $ - Copyright (c) 1998-2005, Index Data. +/* $Id: charset-converter.cpp,v 1.7 2007-12-27 10:44:49 adam Exp $ + Copyright (c) 1998-2006, Index Data. -This file is part of the yaz-proxy. +This file is part of the yazproxy. YAZ proxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -33,7 +33,7 @@ Yaz_CharsetConverter::Yaz_CharsetConverter() Yaz_CharsetConverter::~Yaz_CharsetConverter() { - wrbuf_free(m_wrbuf, 1); + wrbuf_destroy(m_wrbuf); xfree(m_target_query_charset); xfree(m_client_query_charset); } @@ -80,6 +80,7 @@ void Yaz_CharsetConverter::convert_type_1(char *buf_in, int len_in, { wrbuf_rewind(m_wrbuf); wrbuf_iconv_write(m_wrbuf, m_ct, buf_in, len_in); + wrbuf_iconv_reset(m_wrbuf, m_ct); *len_out = wrbuf_len(m_wrbuf); if (*len_out == 0)