Bug 377823

Summary: "40c" not interpreted as a temperature the way "40C" is
Product: [Frameworks and Libraries] frameworks-kunitconversion Reporter: Nate Graham <nate>
Component: generalAssignee: John Layt <jlayt>
Status: CONFIRMED ---    
Severity: normal CC: blackfireburn, kdelibs-bugs, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Nate Graham 2017-03-20 02:34:38 UTC
Plasma 5.9.2 on openSUSE Tumbleweed.

When invoking the unit converter from Plasma Search, numbers ending in a lowercase "c" (e.g. 40c) are not interpreted as a Celsius degree value; instead it is interpreted as a speed. Using an uppercase "C" ( e.g. 40C) causes the correct behavior.
Comment 1 Nate Graham 2017-04-16 16:31:19 UTC
Seems that "c" is interpreted to mean "speed of light." I wonder how often people need to convert to or from the speed of light vs to or from Celsius...
Comment 2 Nate Graham 2017-08-17 03:30:50 UTC
So this is a conflict, because Celsius is defined with a capital C, but the speed of light is defined with a lowercase one:

addCommonUnit(CustomUnit(new CelsiusUnitPrivate(TemperatureCategory, Celsius, 1,
                                                    i18nc("temperature unit symbol", "°C"),
                                                    i18nc("unit description in lists", "Celsius"),
                                                    i18nc("unit synonyms for matching user input", "Celsius;°C;C"),


addUnit(CustomUnit(VelocityCategory, SpeedOfLight, 2.99792458e+08,
                       i18nc("velocity unit symbol", "c"),
                       i18nc("unit description in lists", "speed of light"),
                       i18nc("unit synonyms for matching user input", "speed of light;c"),


Not sure there is any way to resolve this without simply removing the speed of light velocity. I think people probably do unit conversion involving Celsius more frequently than involving the speed of light, but removing features is always painful and annoys some people.
Comment 3 blackfireburn 2019-11-08 22:41:50 UTC
Could it be checked against the covertion to. If '40c to Fahrenheit' the c is a temp marker.