Base: revert to using ASCII chararacters for imperial lengths
The new unit schema management is using U+2032 and U+2033 characters
for feet and inches while parser is expecting only ' and ", while
U+2032 and U+2033 are used for arcminute and arcsecond.
While this is not an ideal solution and parser should deal with both,
revert back to ASCII for now.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
This commit is contained in:
@@ -103,12 +103,13 @@ UnitsSchema::toLocale(const Quantity& quant, const double factor, const std::str
|
||||
std::string valueString =
|
||||
Lc.toString((quant.getValue() / factor), format.toFormat(), format.precision).toStdString();
|
||||
|
||||
return fmt::format(
|
||||
"{}{}{}",
|
||||
valueString,
|
||||
unitString.empty() || unitString == "°" || unitString == "″" || unitString == "′" ? ""
|
||||
: " ",
|
||||
unitString);
|
||||
return fmt::format("{}{}{}",
|
||||
valueString,
|
||||
unitString.empty() || unitString == "°" || unitString == "″"
|
||||
|| unitString == "′" || unitString == "\"" || unitString == "'"
|
||||
? ""
|
||||
: " ",
|
||||
unitString);
|
||||
}
|
||||
|
||||
bool UnitsSchema::isMultiUnitLength() const
|
||||
|
||||
Reference in New Issue
Block a user