Repository: hgrecco/pint

Issue:
micro prefix incompatibility with babel
The mu prefix returned by babel cannot be interpreted by pint. 

```python
import pint
import unicodedata

ureg = pint.UnitRegistry()

# symbol used internally by pint, this works
ureg(unicodedata.lookup('MICRO SIGN'))

# symbol returned by babel, fails
ureg(unicodedata.lookup('GREEK SMALL LETTER MU'))
```

Discussion:
carterbox: Retroactively, I realize that this PR is a duplicate of previous efforts. However, for reasons unclear to me, the unicode character for mu never seems to make into the definition file.
carterbox: Related to #680, #603, #597, #222
hgrecco: I think you need to distinguish between the ability to parse and to print. When parsing adding an alias is easy. Just append at the new alias at the end of the definition or add a replacement rule.

Printing is trickier from the user experience perspective. Right now we support printing the full name of a unit (or prefix) or the symbol (i.e. abbreviated version). We do not have a way to let the user choose if they want to use a unicode version or not (or which version to use).  Most discussions related to unicode in Pint has been due to this. 

In any case, I am ok with supporting multiple parsing options but for printing we should choose one and stick to it
carterbox: I'm only advocating for adding additional parsing ability. Pint should not raise an error if the user provides the "wrong" μ. I agree that there should be one printing option, but I have no opinions about which one (However Wikipedia claims that SI and Unicode both prefer the Greek mu instead of micro character).

I'll try to get all the boxes checked on this PR in the next 20 hours.

carterbox: Ready for review.
jules-ch: Can you add a comment in this line so we know why we have the same glyph twice.
Just as a reminder, you just have to add a comment with `#` on the same line.

I'll look into which one should be prefered for printing, I think we can keep the one defined in pint as not to break compatibility.

Otherwise we will introduce a breaking change if necessary

Patch:
diff --git a/CHANGES b/CHANGES
index 72a2c95..41a0bbd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,7 +7,8 @@ Pint Changelog
 - Reorganized code into facets.
   Each facet encapsulate a Pint functionality.
   (See #1466, #1479)
-
+- Parse both Greek mu and micro Unicode points without error.
+  (Issue #1030, #574)
 
 0.19.2 (2022-04-23)
 -------------------
diff --git a/benchmarks/util.py b/benchmarks/util.py
index 4e72048..7949792 100644
--- a/benchmarks/util.py
+++ b/benchmarks/util.py
@@ -11,7 +11,7 @@ atto- =  1e-18 = a-
 femto- = 1e-15 = f-
 pico- =  1e-12 = p-
 nano- =  1e-9  = n-
-micro- = 1e-6  = µ- = u-
+micro- = 1e-6  = µ- = μ- = u-
 milli- = 1e-3  = m-
 centi- = 1e-2  = c-
 deci- =  1e-1  = d-
diff --git a/pint/default_en.txt b/pint/default_en.txt
index ab8ad23..a3d3a2a 100644
--- a/pint/default_en.txt
+++ b/pint/default_en.txt
@@ -68,7 +68,9 @@ atto- =  1e-18 = a-
 femto- = 1e-15 = f-
 pico- =  1e-12 = p-
 nano- =  1e-9  = n-
-micro- = 1e-6  = µ- = u-
+# The micro (U+00B5) and Greek mu (U+03BC) are both valid prefixes,
+# and they often use the same glyph.
+micro- = 1e-6  = µ- = μ- = u-
 milli- = 1e-3  = m-
 centi- = 1e-2  = c-
 deci- =  1e-1  = d-
@@ -144,7 +146,7 @@ byte = 8 * bit = B = octet
 
 # Length
 angstrom = 1e-10 * meter = Å = ångström = Å
-micron = micrometer = µ
+micron = micrometer = µ = μ
 fermi = femtometer = fm
 light_year = speed_of_light * julian_year = ly = lightyear
 astronomical_unit = 149597870700 * meter = au  # since Aug 2012


Test patch:
diff --git a/pint/testsuite/conftest.py b/pint/testsuite/conftest.py
index 97a944c..6492cad 100644
--- a/pint/testsuite/conftest.py
+++ b/pint/testsuite/conftest.py
@@ -23,7 +23,7 @@ atto- =  1e-18 = a-
 femto- = 1e-15 = f-
 pico- =  1e-12 = p-
 nano- =  1e-9  = n-
-micro- = 1e-6  = µ- = u-
+micro- = 1e-6  = µ- = μ- = u-
 milli- = 1e-3  = m-
 centi- = 1e-2  = c-
 deci- =  1e-1  = d-
diff --git a/pint/testsuite/test_issues.py b/pint/testsuite/test_issues.py
index 5619709..51d33b1 100644
--- a/pint/testsuite/test_issues.py
+++ b/pint/testsuite/test_issues.py
@@ -395,7 +395,10 @@ class TestIssues(QuantityTestCase):
     def test_alternative_angstrom_definition(self, module_registry):
         module_registry.Quantity(2, "\u212B")
 
-    def test_micro_creation(self, module_registry):
+    def test_micro_creation_U03bc(self, module_registry):
+        module_registry.Quantity(2, "μm")
+
+    def test_micro_creation_U00b5(self, module_registry):
         module_registry.Quantity(2, "µm")
 
     @helpers.requires_numpy