SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
352 stars 95 forks source link

Ohm symbol not detected as unit #134

Closed set-soft closed 3 years ago

set-soft commented 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:

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.

SchrodingersGat commented 3 years ago

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...