IME, Unicode and right-to-left text

    Author Unicode content in Design or Source and preserve it through HTML export. Document text direction can be expressed in the HTML independently of the application interface language.

    The Windows qualification includes real Microsoft Japanese IME composition, commit, cancellation and history in both views. Test the input methods and fonts used by your application.

    English, Japanese, Bengali and right-to-left Arabic paragraphs in the Avalonia editor, followed by a mixed-language line entered with the keyboard.
    English, Japanese, Bengali and right-to-left Arabic paragraphs in the Avalonia editor, followed by a mixed-language line entered with the keyboard.

    Use it in your application

    Use Unicode strings and keep document character encoding consistent when saving files. Set language and direction in the authored document when its content requires them.

    During IME composition, preedit belongs to the active editor. Avoid replacing the document from a competing binding or timer while the user is composing.

    Caret and selection text indices use UTF-16 units in the documented native API. They are not byte positions in an encoded HTML file.

    editor.Charset = "utf-8";
    await editor.SetBodyHtmlAsync(@"<p>Unicode: café, Ω, 日本語.</p><p dir=""rtl"">مرحبا بالعالم</p>");
    string document = await editor.GetDocumentHtmlAsync();

    Continue with

    Last updated on Oct 18, 2026

    Put this into practice.

    Start with the C# Avalonia sample. Restore this edition's package and install the native browser prerequisites before running it.

    Prefer a guided look? Book a free live demo with our engineers - live on Zoom or Teams, never a chatbot.