]> git.openstreetmap.org Git - rails.git/commit
Ignore blank codepoints when checking display name widths
authorvignesh-chaturvedi <vigneshchaturvedi@gmail.com>
Wed, 28 Oct 2026 00:14:15 +0000 (05:44 +0530)
committervignesh-chaturvedi <vigneshchaturvedi@gmail.com>
Wed, 28 Oct 2026 19:57:28 +0000 (01:27 +0530)
commit83ad66177f65afbbddbb9e7ed035f7898c139054
tree80ad6f9288c717c55ad3caf813d0b26ec0dfc087
parent6edaa1f5ac5f8b3071fcbe84d92f7882f371c5f3
Ignore blank codepoints when checking display name widths

Display names had to be at least three columns wide, but codepoints
that take up a column without drawing anything, such as the blank
braille pattern or the soft hyphen, counted towards that, so names
that show nothing could still be created.

The width check now leaves out whitespace, control, unassigned,
private use and default ignorable codepoints, along with the blank
braille pattern and the null notehead.

As the width check already sets a minimum, display names no longer
also have to be at least three codepoints long, so names of two wide
codepoints, such as many East Asian full names, are now allowed.
app/models/user.rb
app/validators/width_validator.rb
test/models/user_test.rb