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

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

 



Adam Tla/lka wrote:
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?
I'd let someone else judge, but that is clearly a broken case that just has to be declared broken. <joke>could you please also adapt to a font that has all glyphs looking as smileys?</joke> But it's only three extra lines of code, so let's accept that "c<128" check.
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.
This doesn't match the behaviour of X.
 With current console design it is impossible is case
of correct UTF-8 sequences containing undisplayable glyphs or malformed
sequences.
I agree that, in some cases, it makes sense to copy and paste undisplayable glyphs. However, IMHO, this should not be allowed for malformed sequences.

--
Alexander E. Patrakov

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux