patch for /usr/src/usr.bin/fmt/ (not 8 bit clean) for German & French

Julian H. Stacey jhs at berklix.com
Tue May 25 11:29:20 UTC 2010


Hi Hackers@
Problem: /usr/src/usr.bin/fmt/fmt.c is not 8 bit clean.
(ie French or German etc text with accents in gets broken)

Alternate Solutions:

Solution 1:	Discard "& 0x7f checks.
  Allow pretty much all 8 bit as a printable.  This would need some
  patching.  It might freak out some from the English speaking world ?
 ( We should also consider whether other tools like cat sed awk
  grep etc are 8 bit clean ? )

Solution 2: Apply my patches.
  They work for English German & French
  German for 9 years, French added yesterday (maybe I missed an accent ?).
  If we extended for more languages, would we regret not choosing Solution 1 ?
  http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/usr.bin/fmt/
  Links for all releases from 4.10 to 8.0, reduce to just 4 files:
	Jul 26  2001 ./fmt.1.REL=ALL.diff
	Nov  9  2004 ./fmt.c.tail.diff.REL=4.10-RELEASE.diff
	May 25 00:20 ./fmt.c.tail.diff.REL=5.3-RELEASE.diff
	May 25 02:35 ./fmt.c.top.diff.REL=ALL.diff

Solution 3: Import a single Locale ?
	Inadequate, Would fail to support multiple font sets simunltaneously.
	Example: Pasting notes into an xterm, clauses from
	http://seafrance.com in English then French original &
	German, to get the feel of what an unclear English translation
	really meant on booking amendment fees)

Solution 4: Support Multiple Fonts simultaneously
	How ? Solution 1 or 2 ? or use wchar ? Isocode ? ... Or ?

	A non native English speaker, best to do this I guess.
	Not me: I am English; My patches work for me.  I don't want
	to work more to support fonts I dislike (Before FreeBSD
	started I already listed 3 different incompatible German
	umlaut representations, & had developed Russian fonts for
	SCO, & now with BSD use groff & HTML font escapes, & for
	decades I've experienced regular change of German & English
	& American keyboards eg at customer sites, when all I
	(English) want is Ascii & BIOS conformant American), 
	national accent fonts etc I don't enjoy)

PS I'll be off line soon, won't see replies for a while,
please discuss/ improve/ send-pr/ commit/ whatever in my absence :-).

Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
Mail plain text,  Not HTML quoted-printable Base64 http://www.asciiribbon.org


More information about the freebsd-hackers mailing list