Project

General

Profile

Actions

Bug #21559

open

Unicode normalization nfd -> nfc -> nfd is not reversible

Added by tompng (tomoya ishida) 2 days ago. Updated 1 day ago.

Status:
Open
Target version:
-
[ruby-core:123146]

Description

I expect nfd(nfc(str)) == nfd(str) but found a string that doesn't.

# Ruby 3.1 - 3.5
str = "s\u{11930}\u{323}\u{11930}\u{307}"
p str.unicode_normalize(:nfd) == str.unicode_normalize(:nfc).unicode_normalize(:nfd)
#=> false
# ruby 3.5.0dev
str = "s\u{1611e}\u{323}\u{1611e}\u{307}\u{1611f}"
p str.unicode_normalize(:nfd) == str.unicode_normalize(:nfc).unicode_normalize(:nfd)
#=> false
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0