On Sun, Feb 19, 2006 at 09:24:26AM +0500, Alexander E. Patrakov wrote: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.
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 0xfffdPlease don't do that. Display question marks instead in the case when 0xfffd is not defined.
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 rememberThis doesn't match the behaviour of X.
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 caseI agree that, in some cases, it makes sense to copy and paste undisplayable glyphs. However, IMHO, this should not be allowed for malformed sequences.
of correct UTF-8 sequences containing undisplayable glyphs or malformed
sequences.