Base: Fix wrong character encoding for micro-siemens

Contrary to any other Unit with micro prefix (e.g. ug, uH, uF) the
string was created with a Latin1 encoding instead of UTF-8.

The problem can be verified with these python statements:
```
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroSiemens, 0)
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroGram, 0)
```
This commit is contained in:
Stefan Brüns
2022-03-05 00:26:11 +01:00
committed by Chris Hennes
parent 18371c0d3c
commit 4d63de1fe7
2 changed files with 2 additions and 2 deletions

View File

@@ -351,7 +351,7 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
}
else if (unit == Unit::ElectricalConductance) {
if (UnitValue < 1e-9) {
unitString = QString::fromLatin1("\xC2\xB5S");
unitString = QString::fromUtf8("\xC2\xB5S");
factor = 1e-12;
}
else if (UnitValue < 1e-6) {

View File

@@ -299,7 +299,7 @@ QString UnitsSchemaMKS::schemaTranslate(const Quantity &quant, double &factor, Q
}
else if (unit == Unit::ElectricalConductance) {
if (UnitValue < 1e-9) {
unitString = QString::fromLatin1("\xC2\xB5S");
unitString = QString::fromUtf8("\xC2\xB5S");
factor = 1e-12;
}
else if (UnitValue < 1e-6) {