Re: [PATCH]console:UTF-8 mode compatibility fixes

From: Adam Tla/lka
Date: Sun Feb 19 2006 - 11:16:29 EST


On Sun, Feb 19, 2006 at 09:24:26AM +0500, Alexander E. Patrakov wrote:
> Adam TlaÅka wrote:
>
> >Maybe I should remember all bytes of the UTF-sequence to use their
> >values as a last resort char in case of malformed sequence and 0xfffd
> >not defined?
>
> Please don't do that. Display question marks instead in the case when
> 0xfffd is not defined.

Look at the original code. If conv_uni_to_pc fails and there is no replacement
char (after a clear_unimap for example) and we using US-ASCII we rather
should see something then sequences of '?' chars.
Maybe I could change this to:

if (tc == -4) {
if (c < 128)
tc = c;
else
tc = '?';
}

What about that?

Remembering of original bytes is needed if we could then remember
them in a way so paste from screen gives us the same sequence as it was
in input. With current console design it is impossible is case
of correct UTF-8 sequences containing undisplayable glyphs or malformed
sequences. So I can remove that part of patch and it will wait until
this functionality will be implemented - not so easy but can
be done IMHO and worth it to obtain properly working selection
and copying in UTF-8 mode.

Regards
--
Adam Tla³ka mailto:atlka@xxxxxxxxx ^v^ ^v^ ^v^
System & Network Administration Group ~~~~~~
Computer Center, Gdañsk University of Technology, Poland
PGP public key: finger atlka@xxxxxxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/