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:
committed by
Chris Hennes
parent
271abecb53
commit
bd58a73731
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user