[PR #2240] [MERGED] Improve numeric input handling for all locales (including Persian and Arabic) #3147

Open
opened 2026-01-29 18:22:08 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/2240
Author: @mohammad-mohammadi-dev
Created: 7/31/2025
Status: Merged
Merged: 8/1/2025
Merged by: @enchev

Base: masterHead: master


📝 Commits (2)

  • 0ffc4d8 Improve numeric input support in JS: accept all Unicode digits using \p{Nd}
  • 3d4782e fix: support all Unicode digit inputs in RadzenNumeric

📊 Changes

2 files changed (+27 additions, -7 deletions)

View changed files

📝 Radzen.Blazor/RadzenNumeric.razor.cs (+25 -5)
📝 Radzen.Blazor/wwwroot/Radzen.Blazor.js (+2 -2)

📄 Description

This PR enhances the numeric input behavior to properly support digit characters from all languages using Unicode digit categories.

Previously, entering numbers in languages like Persian (e.g., ۳۴۵) or Arabic (e.g., ٤٥٦) was not accepted by the component, even though those digits are valid Unicode numerals.

I had encountered this issue specifically with Persian and Arabic input, but instead of applying a language-specific fix, I implemented a general solution that uses the Unicode \p{Nd} character class to accept any kind of digit from any locale (e.g., Hindi, Bengali, etc.).

This makes the component language-agnostic, fully Unicode-compliant, and more robust for international use.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/2240 **Author:** [@mohammad-mohammadi-dev](https://github.com/mohammad-mohammadi-dev) **Created:** 7/31/2025 **Status:** ✅ Merged **Merged:** 8/1/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`0ffc4d8`](https://github.com/radzenhq/radzen-blazor/commit/0ffc4d8341b178001259069cd85b6cbdacb544fe) Improve numeric input support in JS: accept all Unicode digits using `\p{Nd}` - [`3d4782e`](https://github.com/radzenhq/radzen-blazor/commit/3d4782e4ee6f815d0d993896ab4448f414414963) fix: support all Unicode digit inputs in RadzenNumeric ### 📊 Changes **2 files changed** (+27 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenNumeric.razor.cs` (+25 -5) 📝 `Radzen.Blazor/wwwroot/Radzen.Blazor.js` (+2 -2) </details> ### 📄 Description This PR enhances the numeric input behavior to properly support digit characters from all languages using Unicode digit categories. Previously, entering numbers in languages like Persian (e.g., ۳۴۵) or Arabic (e.g., ٤٥٦) was not accepted by the component, even though those digits are valid Unicode numerals. I had encountered this issue specifically with Persian and Arabic input, but instead of applying a language-specific fix, I implemented a general solution that uses the Unicode `\p{Nd}` character class to accept any kind of digit from any locale (e.g., Hindi, Bengali, etc.). This makes the component language-agnostic, fully Unicode-compliant, and more robust for international use. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:22:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3147