Fix compilation errors of IfcCharacterEncoder in case ICU is not available

This commit is contained in:
Thomas Krijnen
2012-09-16 12:45:44 +00:00
parent cb6884b48e
commit 0814c16f06
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -300,13 +300,17 @@ char IfcCharacterDecoder::substitution_character = '_';
IfcCharacterEncoder::IfcCharacterEncoder(const std::string& input) {
#ifdef HAVE_ICU
if ( !converter) converter = ucnv_open("utf-8", &status);
#endif
str = input;
}
IfcCharacterEncoder::~IfcCharacterEncoder() {
#ifdef HAVE_ICU
if ( !converter) ucnv_close(converter);
converter = 0;
#endif
}
IfcCharacterEncoder::operator std::string() {