diff --git a/src/ifcgeom_schema_agnostic/IfcGeomRenderStyles.h b/src/ifcgeom_schema_agnostic/IfcGeomRenderStyles.h index 804e1caa12..2154fe24b4 100644 --- a/src/ifcgeom_schema_agnostic/IfcGeomRenderStyles.h +++ b/src/ifcgeom_schema_agnostic/IfcGeomRenderStyles.h @@ -65,7 +65,9 @@ namespace IfcGeom { std::stringstream sstr; std::string sanitized = name; boost::to_lower(sanitized); - boost::replace_all(sanitized, " ", "-"); + std::replace_if(sanitized.begin(), sanitized.end(), [](char c) { + return c < 0x21 || c > 0x7e; + }, '-'); sstr << "surface-style-" << id << "-" << sanitized; this->name = sstr.str(); }