From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.693.1619659085907070069 for ; Wed, 28 Apr 2021 18:18:06 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 29 Apr 2021 09:18:04 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Kinney, Michael D'" Cc: "'Feng, Bob C'" References: <20210428084452.2043-1-yuwei.chen@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBCYXNlVG9vbHM6IENoYW5nZSBub24tYXNjaWkgY2hhcmFjdGVyIG9mIFN0cnVjdHVyZVBjZCBjb21tZW50?= Date: Thu, 29 Apr 2021 09:18:04 +0800 Message-ID: <004801d73c95$81392ac0$83ab8040$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQILYdUYFkwSztXHdqnXPAmkrK9i2gEvosJPAgDhf2GqSOIAEA== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Christine: FCE prints HII question information that is from HII driver UNI file. It= may have non-ascii character. Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Yuwei Chen > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B44=E6=9C=8829=E6=97=A5= 8:25 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Kinney, Michael D ; > devel@edk2.groups.io > =E6=8A=84=E9=80=81: Feng, Bob C ; Liming Gao > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH] BaseTools: Change non-ascii= character of > StructurePcd comment >=20 > Hi Mike, >=20 > The StructurePcd dsc file generated by our tool will have the non-ASCII > character. > The input file of ConvertFceToStructurePcd.py is generated by FCE tool, = which > has the circle R non-ASCII character. This patch change this character t= o ACSII > character when using ConvertFceToStructurePcd.py to generate the > StructurePcd dsc file. >=20 > Best Regards, > Christine >=20 > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Thursday, April 29, 2021 12:10 AM > > To: devel@edk2.groups.io; Chen, Christine ; > Kinney, > > Michael D > > Cc: Feng, Bob C ; Liming Gao > > > > Subject: RE: [edk2-devel] [PATCH] BaseTools: Change non-ascii characte= r of > > StructurePcd comment > > > > What file type contains the non-ASCII character? > > > > I would prefer to see the source file with non ASCII character be upda= ted > > instead of building this conversion into the tools. > > > > Mike > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of Yuwei > > > Chen > > > Sent: Wednesday, April 28, 2021 1:45 AM > > > To: devel@edk2.groups.io > > > Cc: Feng, Bob C ; Liming Gao > > > > > > Subject: [edk2-devel] [PATCH] BaseTools: Change non-ascii character = of > > > StructurePcd comment > > > > > > Currently, the ConvertFceToStructurePcd.py tool generate StructurePc= d > > > dsc file with comments including non-ascii character circle R. This > > > patch changes the non-ascii character circle R to (R) when adding th= e > > > comment. > > > > > > Cc: Bob Feng > > > Cc: Liming Gao > > > Signed-off-by: Yuwei Chen > > > --- > > > BaseTools/Scripts/ConvertFceToStructurePcd.py | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/BaseTools/Scripts/ConvertFceToStructurePcd.py > > > b/BaseTools/Scripts/ConvertFceToStructurePcd.py > > > index 2052db8c4b..d029ed6a28 100644 > > > --- a/BaseTools/Scripts/ConvertFceToStructurePcd.py > > > +++ b/BaseTools/Scripts/ConvertFceToStructurePcd.py > > > @@ -285,6 +285,10 @@ class Config(object): > > > comment_list =3D value_re.findall(line) # the string \\... = in "Q...." > line > > > comment_list[0] =3D comment_list[0].replace('//', '') > > > comment =3D comment_list[0].strip() > > > + comment_b =3D bytes(comment, encoding =3D "utf8") > > > + if b"\xae" in comment_b: > > > + comment_b =3D comment_b.replace(b"\xc2\xae", b"(R)") # > Change > > the circle "R" character to ascii character > > > + comment =3D str(comment_b, encoding =3D "utf-8") > > > line=3Dvalue_re.sub('',line) #delete \\... in "Q...." line > > > list1=3Dline.split(' ') > > > value=3Dself.value_parser(list1) > > > -- > > > 2.26.1.windows.1 > > > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20