From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AD64D2194D389 for ; Wed, 26 Apr 2017 14:11:49 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2017 14:11:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,255,1488873600"; d="scan'208";a="94575476" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 26 Apr 2017 14:11:48 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Apr 2017 14:11:48 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.246]) by FMSMSX109.amr.corp.intel.com ([169.254.15.83]) with mapi id 14.03.0319.002; Wed, 26 Apr 2017 14:11:47 -0700 From: "Carsey, Jaben" To: Jeff Westfahl , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" Thread-Topic: [edk2][PATCH v3] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~ Thread-Index: AQHSvsetDd93HpF1jU6I0+L/w5UlyaHYJacA Date: Wed, 26 Apr 2017 21:11:47 +0000 Message-ID: References: <1493236769-19695-1-git-send-email-jeff.westfahl@ni.com> In-Reply-To: <1493236769-19695-1-git-send-email-jeff.westfahl@ni.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDk3MGM1YWUtYTY5Yi00YjU3LWExMmMtNGQ0ZDgxNGI5NzJkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InhpQzVncUpkblFnaVNtWWhTdU9sbVwvXC9oWWV0ZjR0ZXI5MDFBYXpBaHk3WT0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Subject: Re: [PATCH v3] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~ X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 21:11:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable That makes sense. When I wrote that I was unsure where to draw the line bet= ween which characters to print and which to replace. Reviewed-by: Jaben Carsey > -----Original Message----- > From: Jeff Westfahl [mailto:jeff.westfahl@ni.com] > Sent: Wednesday, April 26, 2017 12:59 PM > To: edk2-devel@lists.01.org > Cc: Jeff Westfahl ; Ni, Ruiyu ; > Carsey, Jaben > Subject: [edk2][PATCH v3] ShellPkg/ShellCommandLib: Update DumpHex to > print {|}~ > Importance: High >=20 > ASCII characters {|}~ should be printed by DumpHex. The problem is that > if you have a string like >=20 > {xizzy}~{foo|bar}~{quux} >=20 > in the dumped data, it will not appear as such in the *-delimited ASCII > column to the right, but as >=20 > .xizzy...foo.bar...quux. >=20 > which is less than ideal. >=20 > Most of the commit message was inspired by/shamelessly stolen from > Laszlo's example: >=20 > https://lists.01.org/pipermail/edk2-devel/2017-April/010266.html >=20 > Cc: Ruiyu Ni > Cc: Jaben Carsey > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jeff Westfahl > Reviewed-by: Laszlo Ersek > --- > ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > index a2ebc8f..bd14878 100644 > --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > @@ -1745,7 +1745,7 @@ DumpHex ( > Val[Index * 3 + 0] =3D Hex[TempByte >> 4]; > Val[Index * 3 + 1] =3D Hex[TempByte & 0xF]; > Val[Index * 3 + 2] =3D (CHAR8) ((Index =3D=3D 7) ? '-' : ' '); > - Str[Index] =3D (CHAR8) ((TempByte < ' ' || TempByte > 'z'= ) ? '.' : > TempByte); > + Str[Index] =3D (CHAR8) ((TempByte < ' ' || TempByte > '~'= ) ? '.' : > TempByte); > } >=20 > Val[Index * 3] =3D 0; > -- > 2.7.4