#include <config.h>
#include "docstream.h"
+#include "unicode.h"
#include <cerrno>
#include <cstdio>
namespace {
-#ifdef WORDS_BIGENDIAN
-char const * ucs4_codeset = "UCS-4BE";
-#else
-char const * ucs4_codeset = "UCS-4LE";
-#endif
char const * utf8_codeset = "UTF-8";
// We use C IO throughout this file, because the facets might be used with
using std::endl;
-namespace {
-
#ifdef WORDS_BIGENDIAN
char const * ucs4_codeset = "UCS-4BE";
char const * ucs2_codeset = "UCS-2BE";
char const * ucs2_codeset = "UCS-2LE";
#endif
+namespace {
+
template<typename RetType, typename InType>
std::vector<RetType>
iconv_convert(iconv_t * cd,
std::vector<char>
ucs4_to_utf8(lyx::char_type const * ucs4str, size_t ls);
+extern char const * ucs4_codeset;
+extern char const * ucs2_codeset;
+
#endif