17 lines
662 B
Plaintext
17 lines
662 B
Plaintext
$NetBSD: patch-aa,v 1.2 2011/12/11 20:51:48 marino Exp $
|
|
|
|
--- src/text.cpp.orig 2009-10-02 22:26:15.000000000 +0000
|
|
+++ src/text.cpp
|
|
@@ -441,7 +441,11 @@ void ConvertToUTF8(const std::string &te
|
|
iconv_t cd = iconv_open("UTF-8", locale_enc);
|
|
char *in_buf = const_cast<char *>(&text_locally_encoded[0]);
|
|
char *out_buf = &text_utf8[0];
|
|
+#if defined(__DragonFly__)
|
|
iconv(cd, &in_buf, &text_length, &out_buf, &text_utf8_length);
|
|
+#else
|
|
+ iconv(cd, (const char **)&in_buf, &text_length, &out_buf, &text_utf8_length);
|
|
+#endif
|
|
iconv_close(cd);
|
|
if (errno != 0)
|
|
std::cerr << "An error occurred recoding " << text_locally_encoded << " to UTF8" << std::endl;
|