As noted in PR https://github.com/contour-terminal/contour/pull/360 that UTF-16 <-> UTF-32 conversion seems broken. That should be fixed and unit tests added / extended.