From b3377c58ffb0bc07d222258ea578bdab723b2ec8 Mon Sep 17 00:00:00 2001 From: delthas Date: Wed, 19 Oct 2022 12:10:39 +0200 Subject: Render the Unicode replacement character properly Previously, we stopped rendering a line on its first Unicode replacement character, because we used that special value for detecting invalid Unicode bytes. Now that we pre-process incoming strings to replace invalid Unicode bytes with the Unicode replacement character [1], there is no need to stop rendering a string on this character: it should just be passed through as is. [1]: 700139404044730a726af7cd57e3d2dbc07871ea --- ui/style.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/ui/style.go b/ui/style.go index aa6683a..9a662e3 100644 --- a/ui/style.go +++ b/ui/style.go @@ -274,9 +274,6 @@ func IRCString(raw string) StyledString { for len(raw) != 0 { r, runeSize := utf8.DecodeRuneInString(raw) - if r == utf8.RuneError { - break - } _, _, lastAttrs := last.Decompose() current := last if r == 0x0F { -- cgit v1.2.3