Remix.run Logo
▲ debugnik an hour ago

From the Ruby docs:

> Non-ASCII case mapping and folding are supported for UTF-8, UTF-16BE/LE, UTF-32BE/LE, and ISO-8859-1~16 Strings/Symbols.

ß might actually be the only character that expands to multiple bytes on the original encoding from that list of ISO encodings.

▲weinzierl an hour ago | parent [-]

Ah, good point. If ISO-8859-1 is the only supported single-byte legacy encoding then ß is most likely the only case.

EDIT: Thinking about it, my example from above should work with UTF-16 input.

U+0149 is a single lower case BMP codepoint, so two bytes in UTF-16. It has no precomposed uppercase, so it turns into two codepoints and 4 bytes in UTF-8 and UTF-16.