Closed set-soft closed 3 years ago
The ohm detection is wrong:
https://github.com/SchrodingersGat/KiBoM/blob/06a14866d8166cfa71ae8ac1a48bda0c160fb380/kibom/units.py#L28
We always apply lower() so we never really get uppercase omega. This is the correct list:
lower()
UNIT_R = ["r", "ohms", "ohm", u'\u03c9']
BTW, I found that an uncommon unicode that we also support is:
'OHM SIGN' (U+2126) SI unit of resistance, named after G. S. Ohm, German physicist preferred representation is U+03A9
The lowercase is the same for:
'GREEK CAPITAL LETTER OMEGA' (U+03A9)
So the above code covers both.
Great catch here @set-soft - if you can provide a fix for https://github.com/SchrodingersGat/KiBoM/issues/133 then this could be included there too...
The ohm detection is wrong:
https://github.com/SchrodingersGat/KiBoM/blob/06a14866d8166cfa71ae8ac1a48bda0c160fb380/kibom/units.py#L28
We always apply
lower()
so we never really get uppercase omega. This is the correct list:BTW, I found that an uncommon unicode that we also support is:
'OHM SIGN' (U+2126) SI unit of resistance, named after G. S. Ohm, German physicist preferred representation is U+03A9
The lowercase is the same for:
'GREEK CAPITAL LETTER OMEGA' (U+03A9)
So the above code covers both.