X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fcharset-converter.cpp;h=573f8e0e23b1787f0be86d195a2a746fda9c7122;hp=91e3aedcbd2272429d07902e00683e9bcba9f784;hb=f5aa3da6fa8c40d6f8295514edf08477e3f3a054;hpb=7b429cd9f6320f71b949f7e90270266b2f617c07 diff --git a/src/charset-converter.cpp b/src/charset-converter.cpp index 91e3aed..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,9 +144,24 @@ 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 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab