Skip to content

Comments

Fix invalid spaces in custom UCUM unit#97

Open
cmoesel wants to merge 1 commit intomainfrom
fix-invalid-ucum-unit
Open

Fix invalid spaces in custom UCUM unit#97
cmoesel wants to merge 1 commit intomainfrom
fix-invalid-ucum-unit

Conversation

@cmoesel
Copy link
Member

@cmoesel cmoesel commented Feb 20, 2026

According to the UCUM specification:

The full range of characters 33–126 can be used within a pair of curly braces (‘{’ and ‘}’).

This means that the custom unit {eskimo kisses} is technically invalid (since the space character is not in the valid range). This PR replaces the space with an underscore (_) since _ is allowed. Without this change, engines that enforce UCUM units will fail this test.

Note that the ucum-lhc library started enforcing this about three years ago (in ucum-lhc v4.1.8).

According to the UCUM spec:
> The full range of characters 33–126 can be used within a pair of curly braces (‘{’ and ‘}’).

This means that the custom unit `{eskimo kisses}` is technically invalid (since the space character is not in the valid range). Replace the space with an underscore (_), which is allowed.
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

Successfully merging this pull request may close these issues.

1 participant