Bug 377823 - "40c" not interpreted as a temperature the way "40C" is
Summary: "40c" not interpreted as a temperature the way "40C" is
Status: CONFIRMED
Alias: None
Product: frameworks-kunitconversion
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: John Layt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-20 02:34 UTC by Nate Graham
Modified: 2019-11-08 22:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.