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@pg.gda.pl ^v^ ^v^ ^v^ System & Network Administration Group ~~~~~~ Computer Center, Gdańsk University of Technology, Poland PGP public key: finger atlka@sunrise.pg.gda.pl