mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 05:00:53 +00:00
When built without ICU filter characters outside of unencoded range
This commit is contained in:
@@ -352,8 +352,15 @@ IfcCharacterEncoder::operator std::string() {
|
|||||||
#else
|
#else
|
||||||
for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) {
|
for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) {
|
||||||
char ch = *i;
|
char ch = *i;
|
||||||
if ( ch == '\\' || ch == '\'' ) oss.put(ch);
|
const bool within_spf_range = ch >= 0x20 && ch <= 0x7e;
|
||||||
oss.put(ch);
|
if (within_spf_range) {
|
||||||
|
if ( ch == '\\' || ch == '\'' ) {
|
||||||
|
oss.put(ch);
|
||||||
|
}
|
||||||
|
oss.put(ch);
|
||||||
|
} else {
|
||||||
|
oss.put('_');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
oss.put('\'');
|
oss.put('\'');
|
||||||
|
|||||||
Reference in New Issue
Block a user