X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fcharset-converter.cpp;h=573f8e0e23b1787f0be86d195a2a746fda9c7122;hp=6eb31c96310ec11505c1aa9007e6135bc481a747;hb=f5aa3da6fa8c40d6f8295514edf08477e3f3a054;hpb=dfdff5f2d2825a500d3d27200d2ec32ee063a975 diff --git a/src/charset-converter.cpp b/src/charset-converter.cpp index 6eb31c9..573f8e0 100644 --- a/src/charset-converter.cpp +++ b/src/charset-converter.cpp @@ -1,5 +1,5 @@ /* This file is part of YAZ proxy - Copyright (C) 1998-2009 Index Data + Copyright (C) 1998-2011 Index Data 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 @@ -144,6 +144,20 @@ void Yaz_CharsetConverter::convert_type_1(Z_RPNQuery *q, ODR o) } } } + +void Yaz_CharsetConverter::convert_term(Z_Term *q, ODR o) +{ + if (m_target_query_charset && m_client_query_charset) + { + m_ct = yaz_iconv_open(m_target_query_charset, + m_client_query_charset); + if (m_ct) + { + convert_type_1(q, o); + yaz_iconv_close(m_ct); + } + } +} /* * Local variables: * c-basic-offset: 4