mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
More fixes related to locales
This commit is contained in:
@@ -651,6 +651,8 @@ std::string Entity::toString(bool upper) {
|
|||||||
Load(ids, true);
|
Load(ids, true);
|
||||||
}
|
}
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
ss.imbue(std::locale::classic());
|
||||||
|
|
||||||
std::string dt = datatype();
|
std::string dt = datatype();
|
||||||
if ( upper ) {
|
if ( upper ) {
|
||||||
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ Ifc2x3::Type::Enum IfcWritableEntity::type() const { return _type; }
|
|||||||
bool IfcWritableEntity::is(Ifc2x3::Type::Enum v) const { return _type == v; }
|
bool IfcWritableEntity::is(Ifc2x3::Type::Enum v) const { return _type == v; }
|
||||||
std::string IfcWritableEntity::toString(bool upper) {
|
std::string IfcWritableEntity::toString(bool upper) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
ss.imbue(std::locale::classic());
|
||||||
|
|
||||||
std::string dt = datatype();
|
std::string dt = datatype();
|
||||||
if ( upper ) {
|
if ( upper ) {
|
||||||
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
||||||
@@ -279,6 +281,7 @@ bool IfcWriteArgument::isNull() const { return argumentType() == argument_type_n
|
|||||||
ArgumentPtr IfcWriteArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); }
|
ArgumentPtr IfcWriteArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); }
|
||||||
std::string IfcWriteArgument::toString(bool upper) const {
|
std::string IfcWriteArgument::toString(bool upper) const {
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
|
str.imbue(std::locale::classic());
|
||||||
StringBuilderVisitor v(str, upper);
|
StringBuilderVisitor v(str, upper);
|
||||||
container.apply_visitor(v);
|
container.apply_visitor(v);
|
||||||
return v;
|
return v;
|
||||||
|
|||||||
Reference in New Issue
Block a user