From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jeff.westfahl@ni.com>
Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com
 [148.163.156.75])
 (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 36AE421A134BB
 for <edk2-devel@lists.01.org>; Wed,  3 May 2017 06:34:39 -0700 (PDT)
Received: from pps.filterd (m0098781.ppops.net [127.0.0.1])
 by mx0a-00010702.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id
 v43DUdM2015026; Wed, 3 May 2017 08:34:38 -0500
Received: from ni.com (skprod3.natinst.com [130.164.80.24])
 by mx0a-00010702.pphosted.com with ESMTP id 2a72m52e1p-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Wed, 03 May 2017 08:34:38 -0500
Received: from us-aus-exhub2.ni.corp.natinst.com
 (us-aus-exhub2.ni.corp.natinst.com [130.164.68.32])
 by us-aus-skprod3.natinst.com (8.16.0.17/8.16.0.17) with ESMTPS id
 v43DYbjM028245
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);
 Wed, 3 May 2017 08:34:37 -0500
Received: from us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) by
 us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) with Microsoft SMTP Server
 (TLS) id 15.0.1156.6; Wed, 3 May 2017 08:34:37 -0500
Received: from jmw-lm181.ni.corp.natinst.com (130.164.49.7) by
 us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) with Microsoft SMTP Server
 id 15.0.1156.6 via Frontend Transport; Wed, 3 May 2017 08:34:37 -0500
Date: Wed, 3 May 2017 08:34:36 -0500
From: Jeff Westfahl <jeff.westfahl@ni.com>
X-X-Sender: jwestfah@jmw-lm181
To: "Carsey, Jaben" <jaben.carsey@intel.com>
CC: Jeff Westfahl <jeff.westfahl@ni.com>, "edk2-devel@lists.01.org"
 <edk2-devel@lists.01.org>, "Ni, Ruiyu" <ruiyu.ni@intel.com>
In-Reply-To: <CB6E33457884FA40993F35157061515C54C0FA40@FMSMSX103.amr.corp.intel.com>
Message-ID: <alpine.DEB.2.20.1705030834120.13015@jmw-lm181>
References: <1493236769-19695-1-git-send-email-jeff.westfahl@ni.com>
 <CB6E33457884FA40993F35157061515C54C0FA40@FMSMSX103.amr.corp.intel.com>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, ,
 definitions=2017-05-03_11:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy
 score=30
 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0
 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0
 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1703280000
 definitions=main-1705030252
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  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
X-List-Received-Date: Wed, 03 May 2017 13:34:39 -0000
Content-Type: text/plain; charset="US-ASCII"; format=flowed

Ray, do you agree? If so, can you please push this?

Thank you,
Jeff

On Wed, 26 Apr 2017, Carsey, Jaben wrote:

> That makes sense. When I wrote that I was unsure where to draw the line between which characters to print and which to replace.
>
> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
>
>> -----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 <jeff.westfahl@ni.com>; Ni, Ruiyu <ruiyu.ni@intel.com>;
>> Carsey, Jaben <jaben.carsey@intel.com>
>> Subject: [edk2][PATCH v3] ShellPkg/ShellCommandLib: Update DumpHex to
>> print {|}~
>> Importance: High
>>
>> ASCII characters {|}~ should be printed by DumpHex. The problem is that
>> if you have a string like
>>
>>     {xizzy}~{foo|bar}~{quux}
>>
>> in the dumped data, it will not appear as such in the *-delimited ASCII
>> column to the right, but as
>>
>>     .xizzy...foo.bar...quux.
>>
>> which is less than ideal.
>>
>> Most of the commit message was inspired by/shamelessly stolen from
>> Laszlo's example:
>>
>>     https://lists.01.org/pipermail/edk2-devel/2017-April/010266.html
>>
>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>> Cc: Jaben Carsey <jaben.carsey@intel.com>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> 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]  = Hex[TempByte >> 4];
>>        Val[Index * 3 + 1]  = Hex[TempByte & 0xF];
>>        Val[Index * 3 + 2]  = (CHAR8) ((Index == 7) ? '-' : ' ');
>> -      Str[Index]          = (CHAR8) ((TempByte < ' ' || TempByte > 'z') ? '.' :
>> TempByte);
>> +      Str[Index]          = (CHAR8) ((TempByte < ' ' || TempByte > '~') ? '.' :
>> TempByte);
>>      }
>>
>>      Val[Index * 3]  = 0;
>> --
>> 2.7.4
>
>