[PATCH i-g-t] tools/intel_vbt_decode: convert copyright signs from latin1 to utf8

Jani Nikula jani.nikula at intel.com
Mon Aug 18 13:41:59 UTC 2025


On Mon, 18 Aug 2025, Kamil Konieczny <kamil.konieczny at linux.intel.com> wrote:
> Hi Jani,
> On 2025-08-18 at 13:51:33 +0300, Jani Nikula wrote:
>> Various tools trip over with latin1 characters in the source, as
>> nowadays everything pretty much expects utf8.
>> 
>> For example, [1] fails to apply in both Patchwork and b4, because
>> somewhere along the way, the latin1 copyright sign has in fact been
>> automagically converted to utf8, and the source still has latin1.
>> 
>> Instead of debugging legacy encodings and conversions, just convert the
>> remaining latin1 files to utf8 using iconv.
>> 
>> [1] https://lore.kernel.org/all/7090e70d712c94aed53f52c49a8155eb4c6b966c.1755175663.git.jani.nikula@intel.com/
>> 
>> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> This still do not apply, now it looks strange even in patchwork,
> two chars 'A^' '(c)' instead of one '(c)'.
>
> With old file:
>
> $ echo $LANG
> C
> $ grep -n Copyright tools/intel_bios.h
> 2: * Copyright � 2006 Intel Corporation
>
> $ export LANG=C.UTF-8
> $ grep -n Copyright tools/intel_bios.h
> grep: tools/intel_bios.h: binary file matches
>
> $ export LANG=C
> $ head -n2 tools/intel_bios.h|tail -n1|od -tx1a
> 0000000  20  2a  20  43  6f  70  79  72  69  67  68  74  20  a9  20  32
> 	 sp   *  sp   C   o   p   y   r   i   g   h   t  sp   )  sp   2
> 0000020  30  30  36  20  49  6e  74  65  6c  20  43  6f  72  70  6f  72
> 	  0   0   6  sp   I   n   t   e   l  sp   C   o   r   p   o   r
> 0000040  61  74  69  6f  6e  0a
> 	  a   t   i   o   n  nl
> 0000046
>
> Your patch now downloaded from patchwork:
>
> $ grep Copyright  /tmp/tools-convert-to-utf8.mbox
> - * Copyright © 2006 Intel Corporation
> + * Copyright © 2006 Intel Corporation
> - * Copyright © 2006 Intel Corporation
> + * Copyright © 2006 Intel Corporation
>
> $ grep Copyright  /tmp/tools-convert-to-utf8.mbox |head -n1|od -tx1a
> 0000000  2d  20  2a  20  43  6f  70  79  72  69  67  68  74  20  c2  a9
>           -  sp   *  sp   C   o   p   y   r   i   g   h   t  sp   B   )
> 0000020  20  32  30  30  36  20  49  6e  74  65  6c  20  43  6f  72  70
> 	 sp   2   0   0   6  sp   I   n   t   e   l  sp   C   o   r   p
> 0000040  6f  72  61  74  69  6f  6e  0a
> 	  o   r   a   t   i   o   n  nl
>
> so in your patch file already has 'c2' 'a9' and that is changed to yet
> another chars?
>
> You could look into your patch here in patchwork:
> https://patchwork.freedesktop.org/patch/669076/?series=153057&rev=1
>
> and compare with another which adds new file also with (c):
> https://patchwork.freedesktop.org/patch/668316/?series=152889&rev=1

Locally the git format-patch patches are fine, and apply fine. Somewhere
between git send-email, various servers, mailing lists, patchwork and
public-inbox it goes south.

I'm sorry, but I can't be bothered to figure out what hoops I have to
jump through to send this patch in a way that all the tools in the
pipeline will understand. Life is too short.

Bottom line, intel_bios.h and intel_vbt_decode.c have latin1 copyright
characters in the repo, and we should get rid of them.

I can push the changes directly from my repo, or you can run 'iconv
--from-code=latin1 --to-code=utf8' on the files yourself, and make it
happen.


BR,
Jani.


>
> Regards,
> Kamil
>
>> 
>> ---
>> 
>> I'll be trying 'git send-email --8bit-encoding=iso-8859-1' on this
>> one. Fingers crossed.
>> ---
>>  tools/intel_bios.h       | 2 +-
>>  tools/intel_vbt_decode.c | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/tools/intel_bios.h b/tools/intel_bios.h
>> index 01de2246e147..d874a268fe70 100644
>> --- a/tools/intel_bios.h
>> +++ b/tools/intel_bios.h
>> @@ -1,5 +1,5 @@
>>  /*
>> - * Copyright © 2006 Intel Corporation
>> + * Copyright © 2006 Intel Corporation
>>   *
>>   * Permission is hereby granted, free of charge, to any person obtaining a
>>   * copy of this software and associated documentation files (the "Software"),
>> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
>> index 7bb3c19c3340..85bda78a2a54 100644
>> --- a/tools/intel_vbt_decode.c
>> +++ b/tools/intel_vbt_decode.c
>> @@ -1,5 +1,5 @@
>>  /*
>> - * Copyright © 2006 Intel Corporation
>> + * Copyright © 2006 Intel Corporation
>>   *
>>   * Permission is hereby granted, free of charge, to any person obtaining a
>>   * copy of this software and associated documentation files (the "Software"),
>> -- 
>> 2.47.2
>> 

-- 
Jani Nikula, Intel


More information about the igt-dev mailing list