Closed cpascual closed 4 years ago
@sergirubio : you are probably interested in this.
Note, until this is merged, you can simply do the following workaround in your code:
# -*- coding: utf-8 -*-
from taurus.core.units import UR
UR.define(u'degreeC = kelvin; offset: 273.15 = °C = ºC = degC = celsius')
@sergirubio : you are probably interested in this.
Note, until this is merged, you can simply do the following workaround in your code:
from taurus.core.units import UR UR.define(u'degreeC = kelvin; offset: 273.15 = °C = ºC = degC = celsius')
Thanks @cpascual, I was just looking for this, you saved me a lot of time.
Hi, I just noticed that TaurusForm does not behave well with unicode characters in the units in python2. (it works well in py3)
b17df86 should fix it
Tip: when defining the unit for an attribute in Tango (e.g. via jive) some clients may not deal well with unicode. In such case, use "celsius" or "degC" as the unit and Taurus will display it as °C
@MikeFalowski , @cpascual , Many thanks for the help!
Make celsius display as "°C" in taurus. Do it by registering a new unit (degreeC) equivalent to degC in
taurus.core.units.UR
This is a workaround until pint properly supports this. See: https://github.com/hgrecco/pint/issues/546