Skip to content

[wasm][hybridglobalization] ToUpper/ToLower does not work correctly when the length of character changes #86794

@ilonatommy

Description

@ilonatommy

Description

For some chars, e.g. "ß" the lenght changes when we change its case -> "SS".

Reproduction Steps

using System;
using System.Globalization;

public class Program
{
public static void Main()
{
Console.WriteLine("Straße".ToUpper(new CultureInfo("de-DE")));
Console.WriteLine("Straße".ToUpperInvariant());
}
}

Expected behavior

The most correct behavior would be to return:

STRASSE
STRASSE
```

However, in non-hybrid it returns:
```
STRAßE
STRAßE
```
so we should align with the non-hybrid.

### Actual behavior

```
STRAße
STRAße
```

### Regression?

_No response_

### Known Workarounds

_No response_

### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions