Skip to content

Can't Enter Non-ISO-8859-1 into Textboxes #3541

@CryZe

Description

@CryZe

Problem

You can't enter any text that can't be encoded as ISO-8859-1 into the textboxes. If you do so, you get:

Uncaught TypeError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': String contains non ISO-8859-1 code point.
    at handleVirtualdomEventSync ((Index):238:6032)
    at NativeInterpreter.sendSerializedEvent ((Index):238:10813)
    at NativeInterpreter.handleEvent ((Index):238:10432)
    at HTMLDivElement.handler ((Index):238:7612)

It seems like the content of the textbox is sent through an HTTP header, which is required to be ISO-8859-1, not UTF-8. The approach probably needs to be changed entirely.

Steps To Reproduce

Steps to reproduce the behavior:

Put some Korean in a text box like for example: 안녕하세요

The textbox should be a basic one that is bound to a signal, though I haven't tested if that's actually necessary:

input {
    value: "{input}",
    oninput: move |e| {
        input.set(e.value());
    },
}

Expected behavior

You should be able to enter any text in a text box.

Environment:

  • Dioxus version: v0.6.1
  • Rust version: 1.83.0
  • OS info: Windows 11
  • App platform: Desktop

Questionnaire

I'm interested in fixing this myself but don't know where to start

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdesktopSuggestions related to the desktop rendererduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions