1 // tinygettext - A gettext replacement that works directly on .po files
2 // Copyright (C) 2006 Ingo Ruhnke <grumbel@gmx.de>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef HEADER_TINYGETTEXT_ICONV_HPP
18 #define HEADER_TINYGETTEXT_ICONV_HPP
25 # define tinygettext_ICONV_CONST const
26 # define tinygettext_iconv_t SDL_iconv_t
27 # define tinygettext_iconv SDL_iconv
28 # define tinygettext_iconv_open SDL_iconv_open
29 # define tinygettext_iconv_close SDL_iconv_close
33 # ifdef HAVE_ICONV_CONST
34 # define tinygettext_ICONV_CONST ICONV_CONST
36 # define tinygettext_ICONV_CONST
39 # define tinygettext_iconv_t iconv_t
40 # define tinygettext_iconv iconv
41 # define tinygettext_iconv_open iconv_open
42 # define tinygettext_iconv_close iconv_close
45 namespace tinygettext {
50 std::string to_charset;
51 std::string from_charset;
52 tinygettext_iconv_t cd;
56 IConv(const std::string& fromcode, const std::string& tocode);
59 void set_charsets(const std::string& fromcode, const std::string& tocode);
60 std::string convert(const std::string& text);
64 IConv& operator= (const IConv&);
67 } // namespace tinygettext