From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51FC1C433EF for ; Mon, 10 Jan 2022 11:09:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60F1B82FF5; Mon, 10 Jan 2022 12:09:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2E63781E02; Mon, 10 Jan 2022 12:09:10 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id E4A3A8302A for ; Mon, 10 Jan 2022 12:09:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AB0162B; Mon, 10 Jan 2022 03:09:02 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8E0B13F5A1; Mon, 10 Jan 2022 03:09:01 -0800 (PST) Date: Mon, 10 Jan 2022 11:08:59 +0000 From: Andre Przywara To: Heinrich Schuchardt Cc: Anatolij Gustschin , Simon Glass , Tom Rini , Alexander Graf , Mark Kettenis , u-boot@lists.denx.de Subject: Re: [PATCH 7/8] efi_selftest: Add box drawing character selftest Message-ID: <20220110110859.5be702cd@donnerap.cambridge.arm.com> In-Reply-To: <525648bb-53de-952e-3f71-b0c34e7fb759@canonical.com> References: <20220110005638.21599-1-andre.przywara@arm.com> <20220110005638.21599-8-andre.przywara@arm.com> <525648bb-53de-952e-3f71-b0c34e7fb759@canonical.com> Organization: ARM X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Mon, 10 Jan 2022 10:23:20 +0100 Heinrich Schuchardt wrote: Hi Heinrich, > On 1/10/22 01:56, Andre Przywara wrote: > > UEFI applications rely on Unicode output capability, and might use that > > for drawing pseudo-graphical interfaces using Unicode defined box > > drawing characters. > >=20 > > Add a simple test to display the most basic box characters, which would > > need to be checked manually on the screen for correctness. > > To facilitate this, add a three second delay after the output at this > > point. > >=20 > > Signed-off-by: Andre Przywara > > --- > > lib/efi_selftest/efi_selftest_textoutput.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > >=20 > > diff --git a/lib/efi_selftest/efi_selftest_textoutput.c b/lib/efi_selft= est/efi_selftest_textoutput.c > > index a437732496b..1542c187de7 100644 > > --- a/lib/efi_selftest/efi_selftest_textoutput.c > > +++ b/lib/efi_selftest/efi_selftest_textoutput.c > > @@ -123,6 +123,17 @@ static int execute(void) > > efi_st_error("OutputString failed for international chars\n"); > > return EFI_ST_FAILURE; > > } > > + ret =3D con_out->output_string(con_out, L"=E2=94=8C=E2=94=80=E2=94= =AC=E2=94=80=E2=94=90\n"); > > + ret |=3D con_out->output_string(con_out, L"=E2=94=82 =E2=94=82 =E2=94= =82\n"); > > + ret |=3D con_out->output_string(con_out, L"=E2=94=9C=E2=94=80=E2=94= =BC=E2=94=80=E2=94=A4\n"); > > + ret |=3D con_out->output_string(con_out, L"=E2=94=82 =E2=94=82 =E2=94= =82\n"); > > + ret |=3D con_out->output_string(con_out, L"=E2=94=94=E2=94=80=E2=94= =B4=E2=94=80=E2=94=98\n"); =20 >=20 > %s/L"/u"/ >=20 > Unicode characters in code are not supported by all tools. The=20 > interpretation may further depend on the users locale. Please, use \u=20 > escape sequences. A single output_string() call is enough. A notice for=20 > the user might be helpful. So I suggest: >=20 > This should render as four boxes with text > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 > =E2=94=82 left top =E2=94=82 right top =E2=94=82 > =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=A4 > =E2=94=82 left bottom =E2=94=82 right bottom =E2=94=82 > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=B4=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 >=20 > const u16 text[] =3D > u"This should render as four boxes with text\n" > u"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" > u"\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500" > u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502" > u" left top \u2502 right top \u2502\n\u251c\u2500" > u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" > u"\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" > u"\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 " > u"left bottom \u2502 right bottom \u2502\n\u2514\u2500\u2500\u2500" > u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534" > u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" > u"\u2500\u2500\u2500\u2500\u2518\n"; Ha, very good, thanks for the hints! And for typing all those numbers! I was wondering about UTF-8 in source, but since my ancient Slackware could deal with it, I deemed it safe ;-) Will fix it accordingly! Cheers, Andre > > + if (ret !=3D EFI_ST_SUCCESS) { > > + efi_st_error("OutputString failed for box drawing chars\n"); > > + return EFI_ST_FAILURE; > > + } > > + con_out->output_string(con_out, L"waiting for admiration...\n"); > > + EFI_CALL(systab.boottime->stall(3000000)); > > efi_st_printf("\n"); > > =20 > > return EFI_ST_SUCCESS; =20 >=20