Adjust to libiconv API change
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 25 May 2009 08:45:47 +0000 (10:45 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 29 May 2009 13:20:12 +0000 (15:20 +0200)
src/stringfunc.cpp

index c2badcb..1fe636a 100644 (file)
@@ -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);