Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.81k stars 146 forks source link

KB interpreted as kelvin * byte #475

Open dslinger-a2 opened 1 year ago

dslinger-a2 commented 1 year ago

The KB unit is interpreted as kelvin * byte. kB works for kilobyte. Might want to consider if this is desired behavior. MB, GB, TB, and PB are interpreted as megabyte, gigabyte, terabyte, and petabyte. Happens on qalc v4.3.0.

hanna-kn commented 1 year ago

Upper-case K is not a prefix. "KB" is nevertheless sometimes used but often meaning 1024 bytes (KiB), but interpreting KB as KiB would confuse the meaning of MB, GB, TB, etc.

idamir commented 1 year ago

All prefixes are case-sensitive items. E.g., M (mega) and m (milli) are 9 orders difference. This issue is not a bug.

vlad2305m commented 1 year ago

If you want to make it work on your machine, you can modify the custom units xml file with a graphical Qalculate! application. Should be as easy as adding a name to an existing unit. Actually isn't (at least for me), so create a derived unit which is equal, or define a variable instead. (#505) Hopefully that solves your issue.