rsl/stringex

Feature: unicode characters to ascii fuzzy equivalents

Opened this issue ยท 0 comments

Thanks for this library!

"๐”ญ๐”ฌ๐”ฑ๐”ฆ๐”ฌ๐”ซ ๐”ฐ๐”ข๐”ฉ๐”ฉ๐”ข๐”ฏ".to_ascii
=> "?????? ??????"

Would be a nice enhancement for this to output:

"๐”ญ๐”ฌ๐”ฑ๐”ฆ๐”ฌ๐”ซ ๐”ฐ๐”ข๐”ฉ๐”ฉ๐”ข๐”ฏ".to_ascii
=> "potion seller"

There is a unicode-tools python library that can handle this, e.g.:
https://unicode.scarfboy.com/?s=%F0%9D%94%AD%F0%9D%94%AC%F0%9D%94%B1%F0%9D%94%A6%F0%9D%94%AC%F0%9D%94%AB+%F0%9D%94%B0%F0%9D%94%A2%F0%9D%94%A9%F0%9D%94%A9%F0%9D%94%A2%F0%9D%94%AF