Re: [PULL 00/66] MIPS patches for 2021-01-07

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/8/21 5:22 AM, 罗勇刚(Yonggang Luo) wrote:
>>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
>>> 80: ordinal not in range(128)
> Can we always reading file in decodetree with utf8 encoding
> And convert all decodetree to utf8 encoding, and the problem should resolved.
> ```
>  scripts/decodetree.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/decodetree.py b/scripts/decodetree.py
> index 47aa9caf6d..8c9eb365ac 100644
> --- a/scripts/decodetree.py
> +++ b/scripts/decodetree.py
> @@ -1304,7 +1304,7 @@ def main():
>  
>      for filename in args:
>          input_file = filename
> -        f = open(filename, 'r')
> +        f = open(filename, 'r', encoding="utf8")
>          parse_file(f, toppat)
>          f.close()
>  
> ```

Thanks.  Would you like to send a formal patch?


r~



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux