Skip to content

Add support for Unicode digit normalization in string to Int and BigI…#2093

Merged
nickeskov merged 5 commits into
masterfrom
fix-ride-unicode-string-to-numbers
May 19, 2026
Merged

Add support for Unicode digit normalization in string to Int and BigI…#2093
nickeskov merged 5 commits into
masterfrom
fix-ride-unicode-string-to-numbers

Conversation

@alexeykiselev
Copy link
Copy Markdown
Collaborator

…nt conversion.

Added conversion of Unicode decimal digits to ASCII digits and integrated it into Ride functions parseInt, parseIntValued, stringToBigInt, and stringToBigIntOpt. Test added and updated.

…nt conversion.

Added conversion of Unicode decimal digits to ASCII digits and integrated it into
Ride functions parseInt, parseIntValued, stringToBigInt, and stringToBigIntOpt.
Test added and updated.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Unicode decimal digit normalization for Ride string-to-number conversions, so supported non-ASCII decimal digits can be parsed as ASCII digits.

Changes:

  • Adds digit normalization helpers for Unicode decimal digit ranges.
  • Integrates normalization into parseInt and BigInt string parsing.
  • Expands tests for Unicode digit inputs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
pkg/ride/functions_strings.go Adds digit normalization and applies it to parseInt.
pkg/ride/functions_strings_test.go Adds Unicode digit cases for parseInt and normalization tests.
pkg/ride/functions_bigint.go Applies digit normalization to stringToBigInt.
pkg/ride/functions_bigint_test.go Adds Unicode digit cases for BigInt conversion functions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/ride/functions_bigint.go
Comment thread pkg/ride/functions_strings.go Outdated
return 0, false
}

// isMathematicalStyleDigit returns true for Mathematical Alphanumeric Symbols like 𝟎-𝟗, 𝟘-𝟡, 𝟢-𝟫, 𝟬-𝟵, 𝟶-𝟿.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Comment thread pkg/ride/functions_strings.go
@nickeskov nickeskov merged commit 30de463 into master May 19, 2026
26 of 27 checks passed
@nickeskov nickeskov deleted the fix-ride-unicode-string-to-numbers branch May 19, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants