Skip to content

Commit 5fe4cfa

Browse files
committed
More fixes related to locales
1 parent b3e5264 commit 5fe4cfa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/ifcparse/IfcParse.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ std::string Entity::toString(bool upper) const {
757757
}
758758

759759
std::stringstream ss;
760+
ss.imbue(std::locale::classic());
761+
760762
std::string dt = datatype();
761763
if (upper) {
762764
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);

src/ifcparse/IfcWrite.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ IfcSchema::Type::Enum IfcWritableEntity::type() const { return _type; }
7676
bool IfcWritableEntity::is(IfcSchema::Type::Enum v) const { return _type == v; }
7777
std::string IfcWritableEntity::toString(bool upper) const {
7878
std::stringstream ss;
79+
ss.imbue(std::locale::classic());
80+
7981
std::string dt = datatype();
8082
if (upper) {
8183
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
@@ -323,6 +325,7 @@ bool IfcWriteArgument::isNull() const { return type() == IfcUtil::Argument_NULL;
323325
Argument* IfcWriteArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); }
324326
std::string IfcWriteArgument::toString(bool upper) const {
325327
std::ostringstream str;
328+
str.imbue(std::locale::classic());
326329
StringBuilderVisitor v(str, upper);
327330
container.apply_visitor(v);
328331
return v;

0 commit comments

Comments
 (0)