advanced patterns of `String#upcase` in Ruby 3.2 with Non-ASCII Characters
I'm working with unexpected results when using the `String#upcase` method in Ruby 3.2 on strings containing non-ASCII characters... I expected that calling `upcase` on a string like `"café"` would return `"CAFÉ"`, but instead, I'm getting `"CAF"` which seems to ignore the `é` character altogether. Here’s a code snippet to illustrate the scenario: ```ruby str = "café" upcased_str = str.upcase puts upcased_str # expected output: CAFÉ ``` However, when I run this code, the output is `CAF`, and I want to figure out why. I have also tried using `str.mb_chars.upcase.to_s` provided by the `active_support` gem, expecting it to handle multibyte characters correctly, but I got the same output. I’ve verified that I’m not dealing with any encoding issues by checking `str.encoding`, which returns `UTF-8`. I even tried upgrading from Ruby 3.1, thinking it might be a bug that was fixed, but the behavior is the same. Does anyone know if there's a known scenario with `String#upcase` in Ruby 3.2 regarding non-ASCII characters? Or is there a different method I should use to achieve the expected behavior? Any help would be greatly appreciated! Thanks in advance!