mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-07 00:45:32 +00:00
disabled char encoding method for windows, although you'll need to add the iconv libs
This commit is contained in:
parent
052d049a6c
commit
305563e595
2 changed files with 84 additions and 72 deletions
|
@ -14,6 +14,11 @@ IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
SET(ICONV_FIND_QUIETLY TRUE)
|
SET(ICONV_FIND_QUIETLY TRUE)
|
||||||
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
SET(ICONV_INCLUDE_DIR $ENV{ICONV_INCLUDE_DIR})
|
||||||
|
SET(ICONV_LIBRARIES $ENV{ICONV_LIBRARIES})
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
|
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
|
||||||
|
|
||||||
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c)
|
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c)
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifndef __WIN32__
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <libs/mangle/stream/stream.hpp>
|
#include <libs/mangle/stream/stream.hpp>
|
||||||
#include <libs/mangle/stream/servers/file_stream.hpp>
|
#include <libs/mangle/stream/servers/file_stream.hpp>
|
||||||
|
@ -621,6 +624,9 @@ public:
|
||||||
// Convert a string from the encoding used by Morrowind to UTF-8
|
// Convert a string from the encoding used by Morrowind to UTF-8
|
||||||
std::string convertToUTF8 (std::string input)
|
std::string convertToUTF8 (std::string input)
|
||||||
{
|
{
|
||||||
|
#ifdef __WIN32__
|
||||||
|
return input;
|
||||||
|
#else
|
||||||
std::string output = "";
|
std::string output = "";
|
||||||
|
|
||||||
//create convert description
|
//create convert description
|
||||||
|
@ -701,6 +707,7 @@ public:
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void skip(int bytes) { esm->seek(esm->tell()+bytes); }
|
void skip(int bytes) { esm->seek(esm->tell()+bytes); }
|
||||||
uint64_t getOffset() { return esm->tell(); }
|
uint64_t getOffset() { return esm->tell(); }
|
||||||
|
|
Loading…
Reference in a new issue