From owner-freebsd-questions@FreeBSD.ORG Tue Jan 27 13:17:53 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6C6A10656E0 for ; Tue, 27 Jan 2009 13:17:53 +0000 (UTC) (envelope-from dickey@saltmine.radix.net) Received: from saltmine.radix.net (saltmine.radix.net [207.192.128.40]) by mx1.freebsd.org (Postfix) with ESMTP id 939408FC0C for ; Tue, 27 Jan 2009 13:17:53 +0000 (UTC) (envelope-from dickey@saltmine.radix.net) Received: from saltmine.radix.net (localhost [127.0.0.1]) by saltmine.radix.net (8.12.2/8.12.2) with ESMTP id n0RD3QfP026303; Tue, 27 Jan 2009 08:03:26 -0500 (EST) Received: (from dickey@localhost) by saltmine.radix.net (8.12.2/8.12.2/Submit) id n0RD3P1a026298; Tue, 27 Jan 2009 08:03:25 -0500 (EST) Date: Tue, 27 Jan 2009 08:03:25 -0500 From: Thomas Dickey To: Chuck Swiger Message-ID: <20090127130325.GA15809@saltmine.radix.net> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <6A32981B-AD8F-4CAA-B1BD-38A06654C69A@mac.com> User-Agent: Mutt/1.3.27i Cc: Svein Halvor Halvorsen , questions@freebsd.org Subject: Re: printf and utf-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 13:17:54 -0000 --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--