Create: Estrogen

Create: Estrogen

3M Downloads

[BUG] Curse of Uwufying is tragically limited to ASCII

ChlorideCull opened this issue · 1 comments

commented

Describe the bug
The "Curse of Uwufying" enchant tragically does not apply properly to words that contain non-ASCII letters.

To Reproduce
Steps to reproduce the behavior:

  1. Equip a helmet with "Curse of Uwufying" applied.
  2. Post unicode suppört in chat.
  3. Notice that the text says U-UNICOWODE SUPPÖWT >w<, missing the second "stutter"

Expected behavior
The text should say "U-UNICOWODE S-SUPPÖWT >w<"

Desktop (please complete the following information):

  • OS: Windows 10

Game log/Crash Report:
N/A

Additional context
I'm fairly certain the issue is in these regexes, which use a-zA-Z - most likely the appropriate replacement is \p{Ll}\p{Lu}, which is all unicode letters that are either uppercase or lowercase.

if (stringLength % 2 == 0) {
// Add more letters to the end of words (Not numbers!)
input = input.replaceAll("([a-zA-Z])(\\b)", "$1$1$1$1$2");
} else {
// 50% chance to duplicate the first letter and add '-'
input = input.replaceAll("\\b([a-zA-Z])([a-zA-Z]*)\\b", "$1-$1$2");
}

commented

oh no. will fix! thanks!