From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v3 06/26] ui/console-vc: add UTF-8 input decoding with CP437 rendering
Date: Fri, 8 May 2026 11:20:32 +0100 [thread overview]
Message-ID: <af248Jn8DkdWJ6qk@redhat.com> (raw)
In-Reply-To: <20260430-qemu-vnc-v3-6-be96757428d0@redhat.com>
On Thu, Apr 30, 2026 at 01:02:39AM +0400, Marc-André Lureau wrote:
> The text console receives bytes that may be UTF-8 encoded (e.g. from
> a guest running a modern distro), but currently treats each byte as a
> raw character index into the VGA/CP437 font, producing garbled output
> for any multi-byte sequence.
>
> Add a UTF-8 decoder using Bjoern Hoehrmann's DFA. The DFA inherently
> rejects overlong encodings, surrogates, and codepoints above U+10FFFF.
> Completed codepoints are then mapped to CP437, unmappable characters are
> displayed as '?'.
>
> Note that QEMU has a "buffered" utf8 decoder in util/unicode.c, but
> it is not a good fit for byte-per-byte decoding.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> ui/cp437.h | 13 ++++
> ui/console-vc.c | 59 ++++++++++++++++
> ui/cp437.c | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ui/meson.build | 2 +-
> 4 files changed, 278 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-05-08 10:20 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 21:02 [PATCH v3 00/26] ui: add standalone VNC server over D-Bus Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 01/26] qemu-options.hx: document -chardev vc backend-specific behavior Marc-André Lureau
2026-05-08 10:10 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 02/26] char: error out if given unhandled size options Marc-André Lureau
2026-05-08 10:14 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 03/26] ui/console: add vc encoding=utf8/cp437 option Marc-André Lureau
2026-05-08 10:15 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 04/26] ui/console: default vc encoding to cp437 for machine < 11.1 Marc-André Lureau
2026-05-08 10:16 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 05/26] ui/dbus: expose vc encoding via D-Bus Chardev.VCEncoding interface Marc-André Lureau
2026-05-08 10:19 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 06/26] ui/console-vc: add UTF-8 input decoding with CP437 rendering Marc-André Lureau
2026-05-08 10:20 ` Daniel P. Berrangé [this message]
2026-04-29 21:02 ` [PATCH v3 07/26] ui/console-vc: move VT100 state machine and output FIFO into QemuVT100 Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 08/26] ui/console-vc: extract vt100_input() from vc_chr_write() Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 09/26] ui/console-vc: extract vt100_keysym() from qemu_text_console_handle_keysym() Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 10/26] ui/console-vc: extract vt100_init() and vt100_fini() Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 11/26] ui/console: remove console_ch_t typedef and console_write_ch() Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 12/26] ui: move FONT_WIDTH/HEIGHT to vgafont.h Marc-André Lureau
2026-04-29 22:49 ` BALATON Zoltan
2026-04-30 8:06 ` Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 13/26] ui/console-vc: move VT100 emulation into separate unit Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 14/26] ui/vnc: make the worker thread per-VncDisplay Marc-André Lureau
2026-05-08 10:22 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 15/26] ui/vnc: vnc_display_init() and vnc_display_open() return bool Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 16/26] ui/vnc: merge vnc_display_init() and vnc_display_open() Marc-André Lureau
2026-05-08 10:23 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 17/26] ui/vnc: clean up VNC displays on exit Marc-André Lureau
2026-05-08 10:24 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 18/26] ui/vnc: defer listener registration until the console is known Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 19/26] ui/vnc: add vnc-system unit, to allow different implementations Marc-André Lureau
2026-05-08 10:25 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 20/26] ui/console: simplify registering display/console change listener Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 21/26] ui/console: add doc comment for qemu_console_{un}register_listener() Marc-André Lureau
2026-05-08 10:26 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 22/26] ui/console: rename public API to use consistent qemu_console_ prefix Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 23/26] ui/vnc: replace VNC_DEBUG with trace-events Marc-André Lureau
2026-05-08 10:27 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 24/26] ui: extract common sources into a static library Marc-André Lureau
2026-04-29 21:02 ` [PATCH v3 25/26] tests/qtest: drop DBUS_VMSTATE_TEST_TMPDIR Marc-André Lureau
2026-05-08 10:28 ` Daniel P. Berrangé
2026-04-29 21:02 ` [PATCH v3 26/26] tools/qemu-vnc: add standalone VNC server over D-Bus Marc-André Lureau
2026-05-08 10:45 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af248Jn8DkdWJ6qk@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.