Korean characters are not rendered correctly
Author: sxyaziCreated Oct 2, 2024Updated Sep 24, 2026
LabelsType: Bug
Description
Ratatui only renders part of the code points when rendering Korean characters, which may be related to different Unicode normalization forms. macOS uses NFD (가나다라마), while other systems use NFC (가나다라마), and I tested that the latter works correctly
Related issue: https://github.com/sxyazi/yazi/issues/1714
To Reproduce
use ratatui::text::Span;
fn main() {
let mut terminal = ratatui::init();
_ = terminal.draw(|frame| {
let greeting = Span::raw("가나다라마");
frame.render_widget(greeting, frame.area());
});
std::thread::sleep(std::time::Duration::from_secs(5));
ratatui::restore();
}Running the above code will yield:
Expected behavior
Korean characters should be fully rendered - this is how it looks in the shell:
This is in Neovim:
This is in a terminal file manager lf:
Environment
- OS: macOS
- Terminal Emulator: kitty
- Font: SF Mono
- Crate version: 0.28.1
- Backend: crossterm
Additional context
I also tested joshuto and xplr which uses Ratatui as the UI library, and observed the same result:
Source: ratatui/ratatui