Skip to content

micro prefix incompatibility with babel #1030

Closed
@matt-m-herndon

Description

@matt-m-herndon

The mu prefix returned by babel cannot be interpreted by pint.

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'))

Activity

hgrecco

hgrecco commented on Feb 19, 2020

@hgrecco
Owner

Not sure where babel goes into this. But, there is a definition file that include the prefix and their aliases. Adding this prefix to that file should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @hgrecco@matt-m-herndon

      Issue actions

        micro prefix incompatibility with babel · Issue #1030 · hgrecco/pint