Skip to content

Blazor hybrid: issue encoding Æ ø å on Android 11 #63088

@khaledmousa

Description

@khaledmousa

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When running a Blazor Hybrid MAUI app on Android 11, inputs bound to a string get incorrect values for the characters Æ ø å (which can be typed by enabling Norwegian language or long pressing 'A' on the English GBoard)

It appears that the characters are encoded with the correct first byte, but the second byte being 255 instead of 0.
For example, Æ gets encoded as [198, 255] instead of [198, 0] (on the dotnet side)

The issue does not happen on newer versions of Android (e.g. 13)

This happens even when using using JS oninput to manually pass the call to a dotnet method, with the input as parameter (instead of using @bind)

This was tested on an Android 11 emulator with Chrome & Android System WebView version 83.0.4103.106

Image

Expected Behavior

Expected the UTF-8 characters in the Android WebView to be encoded correctly on the dotnet side

Steps To Reproduce

Repo that recreates the issue

The relevant part is simple a bound input in Home.razor

Exceptions (if any)

No response

.NET Version

9.0.302

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions