-
Notifications
You must be signed in to change notification settings - Fork 401
Closed
Description
Hi there,
I have a weird situation where I pass in what I think is the correct abbreviation for a Micro scale unit, but it fails.
Here is the unit test:
[Test]
public void GetAllElectricalPotentialAbbreviations()
{
UnitSystem usUnits = UnitSystem.GetCached(GetCulture("en-US"));
var abbreviations = usUnits.GetAllAbbreviations(ElectricPotentialUnit.Microvolt);
Assert.AreEqual("μV", abbreviations[0]);
Assert.AreEqual("µV", abbreviations[0]);
Assert.AreEqual("μV", "µV");
}
Here is the result, which fails on the second assertion:
String lengths are both 2. Strings differ at index 0.
Expected: "µV"
But was: "μV"
-----------^
It seems like this WYSIWYG editor makes the differences in the encoding more visually obvious.
In fact, none of the editors i have used so far (include Visual Studio) have made a distinction between the two characters.
But how do i correctly deal with this difference programmatically?
Metadata
Metadata
Assignees
Labels
No labels