NetBSD/dist
christos ab35868474 It is ridiculous to truncate files on character conversions without
warning and a chance for recovery. This patch sets the handler to
copy the character, clear the error and proceed instead of bailing
out.

To replicate:
	- unset LANG
	- Create a file that has ~1000 lines. Put a single bad character
	- '\344' in it, around 2/3rds of the file down. Save it.
	- export LANG=en_US.UTF-8
	- edit the file. Notice there is no error for input conversion,
	  since nvi reads the file opportunistically.
	- :w Boom, the file is truncated.

Alternatively, you can put that character in the first line of the file,
and watch the fireworks. If you like to restore the previous behavior
compile with -DERROR_ON_CONVERT

XXX: Pullup to 6, 5 etc.
2013-01-23 18:51:51 +00:00
..
dhcp include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland 2012-01-04 16:09:40 +00:00
nvi It is ridiculous to truncate files on character conversions without 2013-01-23 18:51:51 +00:00
pdisk Casting an uint32_t pointer to (long *) may have been acceptable 2012-06-25 16:47:03 +00:00
pf ftp-proxy: disable NPF bits for now; it will be re-done. 2012-12-24 01:14:40 +00:00
pppd Protect a few more quotes in chat script examples. 2012-11-19 22:31:34 +00:00
smbfs Also eliminate now-no-longer-used local variable. 2011-09-22 16:08:49 +00:00