Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use µ instead of u #4

Closed
Papagaai35 opened this issue Jan 24, 2018 · 1 comment
Closed

Use µ instead of u #4

Papagaai35 opened this issue Jan 24, 2018 · 1 comment

Comments

@Papagaai35
Copy link

According to the Bureau International des Poids et Mesures, the symbol for micro is µ (not u).
See https://www.bipm.org/utils/common/pdf/si_brochure_8_en.pdf

Could we build in a option to use µ instead of u, or make it standard?

cfobel added a commit that referenced this issue Jan 25, 2018
Prior to this commit, return types were `str` and the character `u` was
used to denote the SI unit prefix for *"micro"*.  However, as discussed in
issue #4, the Bureau International des Poids et Mesures specifies that the
character `Â` (i.e., `u'\N{MICRO SIGN}'`, `'\x0b5'`) **MUST** be used to
denote the SI unit prefix for *"micro"*.  See [this report][1] for
details.

In this commit:

 - Define SI prefix units as unicode strings.
 - Specify SI unit portion of regular expressions as unicode.
 - Change return types to unicode strings.

Fixes issue #4.

[1]: https://www.bipm.org/utils/common/pdf/si_brochure_8_en.pdf
cfobel added a commit that referenced this issue Jan 25, 2018
@cfobel
Copy link
Owner

cfobel commented Jan 25, 2018

@Papagaai35 thanks for submitting this issue!

This issue is fixed by 89ccc0e (i.e., v1.0), which is now available on PyPi and the sci-bots Conda channel.

Note that the major version has been updated since switching to unicode strings (to support the µ character) is an API-breaking change and may break code expecting a str return type.

@cfobel cfobel closed this as completed Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants