Date: Tue, 27 Jan 2009 08:03:25 -0500 From: Thomas Dickey <dickey@radix.net> To: Chuck Swiger <cswiger@mac.com> Cc: Svein Halvor Halvorsen <svein.h@lvor.halvorsen.cc>, questions@freebsd.org Subject: Re: printf and utf-8 Message-ID: <20090127130325.GA15809@saltmine.radix.net> In-Reply-To: <6A32981B-AD8F-4CAA-B1BD-38A06654C69A@mac.com> References: <497E31EE.9010202@lvor.halvorsen.cc> <0B02CEE8-D38A-4D94-B76D-49721BDDACF0@mac.com> <497E41B8.2030203@lvor.halvorsen.cc> <6A32981B-AD8F-4CAA-B1BD-38A06654C69A@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2009 at 03:03:44PM -0800, Chuck Swiger wrote: > On Jan 26, 2009, at 3:05 PM, Svein Halvor Halvorsen wrote: > >Do you have a suggestion to solve the following problem without =20 > >using printf(1): > > > >I have a text file that I want to print in a "box" on a terminal =20 > >from a shell script. Now I've padded the lines with spaces to a =20 > >certain length using printf %-70s and appended the box drawing =20 > >character. Is there another simple way that will work with utf-8? >=20 > My first thought was about dialog(1), but I'm not sure whether that =20 > deals with UTF8 any better...? There's dialog(1) in the FreeBSD tree, and dialog(1) on my website. The latter can work with UTF-8 (if it's built with ncursesw). But that's a little different from printf... --=20 Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQFJfwXttIqByHxlDocRAgveAJ9r8Jq+7UOjCPYxCxGLNIx9gMaFWwCfeDss h8G6+yjdqTb0gwerChV9Vj0= =oOX3 -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090127130325.GA15809>