Skip to content

Unicode is_number and is_digit #6310

@StudebakerGuy

Description

@StudebakerGuy

Context

Odin: dev-2026-02:11d2d3727
OS: OpenMandriva Lx 26.90 (Nickel) Cooker, Linux 6.18.5-desktop-1omv2590
CPU: AMD Ryzen Threadripper PRO 5955WX 16-Cores
RAM: 96430 MiB
Backend: LLVM 21.1.8

Expected Behavior

I would have expected is_digit and is_number in the Unicode pacakge to return true for the code point
U+0C68 since it is in category Nd or decimal number.

Current Behavior

Both functions return false. Looking at is_digit, it only returns true for ASCII 0 through 9.

Steps to Reproduce

package main
import "core:fmt"
import "core:unicode"

main :: proc () {
	r: rune = 0x0c68
	fmt.printfln("Is {} a digit {}", r,  unicode.is_digit(r))
	fmt.printfln("Is {} a number {}", r,  unicode.is_number(r))

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreplicatedWe were able to replicate the bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions