Date: Wednesday, January 24, 2007 @ 10:07:31
Author: csaba
Path: /cvsroot/carob/libmysequoia/src
Modified: Converter.cpp (1.3 -> 1.4)
On FreeBSD use the UCS-4-INTERNAL codeset.
---------------+
Converter.cpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: libmysequoia/src/Converter.cpp
diff -u libmysequoia/src/Converter.cpp:1.3 libmysequoia/src/Converter.cpp:1.4
--- libmysequoia/src/Converter.cpp:1.3 Wed Dec 20 16:26:04 2006
+++ libmysequoia/src/Converter.cpp Wed Jan 24 10:07:31 2007
@@ -43,9 +43,15 @@
bool
Converter::set_code(const string &code)
{
+#ifdef __FreeBSD__
+ const char * wchar_codeset = "UCS-4-INTERNAL";
+#else
+ const char * wchar_codeset = "WCHAR_T";
+#endif
+
close();
- cd_from = iconv_open(code.c_str(), "WCHAR_T");
- cd_to = iconv_open("WCHAR_T", code.c_str());
+ cd_from = iconv_open(code.c_str(), wchar_codeset);
+ cd_to = iconv_open(wchar_codeset, code.c_str());
return ((cd_from != iconv_t(-1)) && (cd_to != iconv_t(-1)));
}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits