Re: utf8, macos x, and fmt

  • From: "Mark H. Wilkinson" <mhw+wily@xxxxxxxxxxx>
  • To: Wily Fans mailing list <wilyfans@xxxxxxxxxxxxx>
  • Date: 08 May 2003 12:48:04 +0100

On Thu, 2003-05-08 at 01:44, John Lamoreaux wrote:
> Macos x has an old version of fmt (ca. 1993 according to the man page). 
>   When applied to UTF8 text (via |fmt), everything other than the ascii 
> characters seem simply to be dropped.  Does anyone have an idea where a 
> UTF8-enabled version of fmt might be found?  (As I'm not much of a 
> programmer, I would prefer one that would compile on the mac without 
> too much work.)

The one that comes with most Linux distributions is from the GNU
textutils package. It manages to reformat trilang.utf from the 9term
distribution, at least.

You might be able to extract the fmt executable from the fink binary
package. The .deb packages that fink uses are compressed tar files
wrapped in 'ar' wrappers:

[mhw@kremvax t]$ ls
textutils_2.0-4_darwin-powerpc.deb
[mhw@kremvax t]$ ar x textutils_2.0-4_darwin-powerpc.deb
[mhw@kremvax t]$ tar xzf data.tar.gz
[mhw@kremvax t]$ ls -l sw/bin/fmt
-rwxr-xr-x    1 mhw      mhw         81712 Sep 19  2002 sw/bin/fmt
[mhw@kremvax t]$ file !$
file sw/bin/fmt
sw/bin/fmt: Mach-O executable powerPC
[mhw@kremvax t]$

That's on Linux, so I can't verify that the resulting binary will
actually work...

-Mark.


Other related posts: