]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/Misc.py
BaseTools:Coding problems caused by special characters
[mirror_edk2.git] / BaseTools / Source / Python / Common / Misc.py
index c7daf5417cdada9b6113467bfc4f3180dbf5536d..47f8e45222db3c8ad9cc06366620223149508172 100644 (file)
@@ -1032,7 +1032,7 @@ def ParseFieldValue (Value):
             p.stderr.close()\r
         if err:\r
             raise BadExpression("DevicePath: %s" % str(err))\r
-        out = out.decode()\r
+        out = out.decode(encoding='utf-8', errors='ignore')\r
         Size = len(out.split())\r
         out = ','.join(out.split())\r
         return '{' + out + '}', Size\r