Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/cpp/web-ifc/parsing/IfcTokenChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ namespace webifc::parsing
// if its a quote, maybe its the end of the string
if (_fileStream->Get() == '\'')
{
// ISO 10303-21: \S\c encodes a single character c with high bit set.
// If c happens to be an apostrophe, it is NOT a string terminator.
size_t sz = temp.size();
if (sz >= 4 &&
temp[sz - 4] == '\\' &&
(temp[sz - 3] == 'S' || temp[sz - 3] == 's') &&
temp[sz - 2] == '\\')
{
_fileStream->Forward();
continue;
}
// if there's another quote behind it, its not
_fileStream->Forward();
if (_fileStream->Get() == '\'')
Expand Down