Skip to content

Unicode support for astropy units #9347

Description

@maxnoe

Dealing with unit strings received from somewhere, it would be nice if astropy supported common unicode symbols.

E.g.

import astropy.units as u

u.Unit('µg')  # MICRO SIGN (U+00B5)
u.Unit('μm') # GREEK SMALL LETTER MU (U+03BC)
u.Unit('m²')  # SUPERSCRIPT TWO (U+00B2)
u.Unit('m³') # SUPERSCRIPT THREE (U+00B3)
u.Unit('s⁻¹') # SUPERSCRIPT MINUS  (U+207B) + SUPERSCRIPT 1 (U+00B9) 

Probably there is more...

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions