Subject: bug#44155: Print integers as characters

From: Juri Linkov <[email-masked]>
Date: Sun, 01 Nov 2020 20:39:48 +0200

>> This is because 4194176 is printed as ?\200 that is parsed as 128.
>> 
>> This patch should fix test failures by printing integers
>> for ambiguous characters.  I'm sure no user would complain
>> that numbers between 4194176 and 4194303 are printed as integers.
>> 
>>  	if (EQ (Vinteger_output_format, Qt) && CHARACTERP (obj)
>> -	    && (c = XFIXNUM (obj)))
>> +	    && (c = XFIXNUM (obj)) && ! CHAR_BYTE8_P (c))
>
> If a test fails, it is better to fix the test and not make the code
> less powerful, don't you agree?

This means sweeping the problems under the carpet.

> To produce 4194176 from ?\200, one way is this:
>
>   (decode-char 'eight-bit ?\200)
>
> Can't this be used in the test?

Using this code in tests means that the users should use the same code
in their programs.  Thus 'print' should print '(33 4194176) as such ugly code:
`(?! ,(decode-char 'eight-bit ?\200))