JBTerminalWidget and CJK character support

Hello,I’m developing the MicroPython Tools plugin. One of the features it offers is a REPL terminal to facilitate communicating with the device’s REPL. I use JBTerminalWidget for this, here is how it’s implemented:

private fun jediTermWidget(project: Project, disposable: Disposable, connector: TtyConnector): JComponent {
val componentRegistryService = project.service()
val mySettingsProvider = JBTerminalSystemSettingsProvider()
val terminal = JBTerminalWidget(project, mySettingsProvider, disposable)
componentRegistryService.registerTerminal(terminal)
terminal.isEnabled = false
with(terminal.terminal) {
    setModeEnabled(TerminalMode.ANSI, true)
    setModeEnabled(TerminalMode.AutoNewLine, true)
    setModeEnabled(TerminalMode.WideColumn, true)
}
terminal.ttyConnector = connector
terminal.start()

val widget = BorderLayoutPanel()
widget.addToCenter(terminal)
val actions = ActionManager.getInstance().getAction("micropythontools.repl.ReplToolbar") as ActionGroup
val actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.TOOLBAR, actions, true)
actionToolbar.targetComponent = terminal
widget.addToTop(actionToolbar.component)
return widget
}

It works great for ANSI color codes, translating input like MicroPython shortcuts (Ctrl + A…), sending arrow keys for going through the MicroPython REPL command history and so on.

However, some of my plugin’s users are running into problems with CJK character getting truncated:

Is this a known limitation of JBTerminalWidget? Is there some workaround/alternative element that does what JBTerminalWidget does and that would support CJK characters on top of that?