mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Add ICU header and namespace in IfcCharacterDecoder
To compile on macOS with a recent ICU, we have to add the correct header and refer to the right namespace in IfcCharacterDecoder
This commit is contained in:
@@ -77,7 +77,7 @@ void IfcCharacterDecoder::addChar(std::stringstream& s,const UChar32& ch) {
|
|||||||
maximum length in bytes is 4. We add 1 for the NUL character. In other encodings
|
maximum length in bytes is 4. We add 1 for the NUL character. In other encodings
|
||||||
the length could be higher, but we have not taken that into account. */
|
the length could be higher, but we have not taken that into account. */
|
||||||
char extraction_buffer[5] = {};
|
char extraction_buffer[5] = {};
|
||||||
UnicodeString(ch).extract(extraction_buffer,5,destination,status);
|
icu::UnicodeString(ch).extract(extraction_buffer,5,destination,status);
|
||||||
extraction_buffer[4] = '\0';
|
extraction_buffer[4] = '\0';
|
||||||
s << extraction_buffer;
|
s << extraction_buffer;
|
||||||
} else {
|
} else {
|
||||||
@@ -386,4 +386,4 @@ IfcCharacterEncoder::operator std::string() {
|
|||||||
#ifdef HAVE_ICU
|
#ifdef HAVE_ICU
|
||||||
UErrorCode IfcCharacterEncoder::status = U_ZERO_ERROR;
|
UErrorCode IfcCharacterEncoder::status = U_ZERO_ERROR;
|
||||||
UConverter* IfcCharacterEncoder::converter = 0;
|
UConverter* IfcCharacterEncoder::converter = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* *
|
* *
|
||||||
* This file is part of IfcOpenShell. *
|
* This file is part of IfcOpenShell. *
|
||||||
* *
|
* *
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_ICU
|
#ifdef HAVE_ICU
|
||||||
#include "unicode/ucnv.h"
|
#include "unicode/ucnv.h"
|
||||||
|
#include "unicode/unistr.h"
|
||||||
#else
|
#else
|
||||||
typedef unsigned int UChar32;
|
typedef unsigned int UChar32;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user