Be in control of what codepoints your string contains. Charcutter provides current Unicode-based regexs to restrict or permit certain characters in your user input.
Version 0.1.0: Only ignorable characters are supported.
Unicode version: 18.0.0 (September 2026)
gem "charcutter"require "charcutter"
# Example string containing U+FE00 is VARIATION SELECTOR-1, an ignorable codepoint
string = "A\u{FE00}B"
# Wrap string in Charcutter[] and call deny with codepoint types to remove
Charcutter[string].deny(:ignorable) # => "AB"See unicode-confusable for for a use-case of this library.
- Copyright (C) 2026 Jan Lelis https://janlelis.com. Released under the MIT license.
- Unicode data: https://www.unicode.org/copyright.html#Exhibit1