From: Thomas Jarosch Date: Mon, 25 May 2009 08:45:47 +0000 (+0200) Subject: Adjust to libiconv API change X-Git-Tag: v2.6~112^2~26 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=5a4ecb51a0abcffc22f9773d415fdc25b5f325e3;p=libi2ncommon Adjust to libiconv API change --- diff --git a/src/stringfunc.cpp b/src/stringfunc.cpp index c2badcb..1fe636a 100644 --- a/src/stringfunc.cpp +++ b/src/stringfunc.cpp @@ -555,7 +555,7 @@ std::string iso_to_utf8(const std::string& isostring) if (buf == NULL) throw runtime_error("out of memory for iconv buffer"); - const char *in = isostring.c_str(); + char *in = (char *)isostring.c_str(); char *out = buf; iconv(i2utf8, &in, &in_size, &out, &out_size); @@ -585,7 +585,7 @@ std::string utf8_to_iso(const std::string& utf8string) if (buf == NULL) throw runtime_error("out of memory for iconv buffer"); - const char *in = utf8string.c_str(); + char *in = (char *)utf8string.c_str(); char *out = buf; iconv(utf82iso, &in, &in_size, &out, &out_size); @@ -613,7 +613,7 @@ wchar_t* utf8_to_wbuf(const std::string& utf8string) if (buf == NULL) throw runtime_error("out of memory for iconv buffer"); - const char *in = utf8string.c_str(); + char *in = (char *)utf8string.c_str(); char *out = (char*) buf; if (iconv(utf82wstr, &in, &in_size, &out, &out_size) == -1) throw runtime_error("error converting char encodings"); @@ -641,7 +641,7 @@ std::string utf7imap_to_utf8(const std::string& utf7imapstring) if (buf == NULL) throw runtime_error("out of memory for iconv buffer"); - const char *in = utf7imapstring.c_str(); + char *in = (char *)utf7imapstring.c_str(); char *out = buf; iconv(utf7imap2utf8, &in, &in_size, &out, &out_size); @@ -673,7 +673,7 @@ std::string utf8_to_utf7imap(const std::string& utf8string) if (buf == NULL) throw runtime_error("out of memory for iconv buffer"); - const char *in = utf8string.c_str(); + char *in = (char *)utf8string.c_str(); char *out = buf; iconv(utf82utf7imap, &in, &in_size, &out, &out_size);