This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sevenbit-strings only partially respected?


Vladimir Prus wrote:

> 
> I've run into a situation where setting 'print sevenbit-strings' of off still
> does not prevent GDB from escaping some characters. Specifically,
> consider the character 0xD0, and this bit in printchar:
> 
>   if (c < 0x20 ||		/* Low control chars */
>       (c >= 0x7F && c < 0xA0) ||	/* DEL, High controls */
>       (sevenbit_strings && c >= 0x80))
>     {/* high order bit set */
> 
> Apparently, the second condition fires and causes 0xD0 to be quoted. Is
> this expected behaviour?

Doh. Of course 0xD0 is larger than 0xA0. The value that causes the actual
problem is 0x83. Russian letter 'Ñ' is encoded in UTF8 as 0xD1 0x83, and
because of the above code, strings with that letter (and some other letters)
get messed up completely.

Can we please have that

	(c >= 0x7F && c < 0xA0)

clause ripped off?

Thanks,
Volodya



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]