diff --git a/INSTALL b/INSTALL index b63ff36da..46044d473 100644 --- a/INSTALL +++ b/INSTALL @@ -62,9 +62,9 @@ First, here is a quick list of the required software dependencies: - system - thread - filesystem - - regex (built against libicu >= 4.2) + - regex (optionally built with icu regex support) - python - required only for python bindings (see below) -- libicu >= 4.2 - International Components for Unicode +- libicu >= 4.0 - International Components for Unicode - libpng - PNG Graphics - libjpeg - JPEG Graphics - libtiff - TIFF Graphics diff --git a/SConstruct b/SConstruct index 0b641e6e4..7ce01463e 100644 --- a/SConstruct +++ b/SConstruct @@ -809,7 +809,7 @@ int main() return False major, minor = map(int,result.split('.')) - if major >= 4 and minor >= 2: + if major >= 4 and minor >= 0: color_print(4,'\nFound icu version... %s\n' % result) return True diff --git a/src/map.cpp b/src/map.cpp index da0683a2a..a40ba593c 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -29,6 +29,9 @@ #include #include +// icu +#include + namespace mapnik { @@ -653,7 +656,11 @@ void Map::init_metawriters() void Map::set_metawriter_property(std::string name, std::string value) { +#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >=2) metawriter_output_properties[name] = UnicodeString::fromUTF8(value); +#else + metawriter_output_properties[name] = UnicodeString(value.c_str()); +#endif } std::string Map::get_metawriter_property(std::string name) const