From owner-freebsd-questions@FreeBSD.ORG Mon Jan 26 23:03:44 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 DED7210656D7 for ; Mon, 26 Jan 2009 23:03:44 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by mx1.freebsd.org (Postfix) with ESMTP id C42DB8FC16 for ; Mon, 26 Jan 2009 23:03:44 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out3.apple.com (Postfix) with ESMTP id B55164EC9D76; Mon, 26 Jan 2009 15:03:44 -0800 (PST) Received: from relay11.apple.com (unknown [127.0.0.1]) by relay11.apple.com (Symantec Brightmail Gateway) with ESMTP id 9E19028098; Mon, 26 Jan 2009 15:03:44 -0800 (PST) X-AuditID: 11807130-a508abb000000fcd-11-497e41502d53 Received: from cswiger1.apple.com (cswiger1.apple.com [17.227.140.124]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay11.apple.com (Apple SCV relay) with ESMTP id 817962807E; Mon, 26 Jan 2009 15:03:44 -0800 (PST) Message-Id: <6A32981B-AD8F-4CAA-B1BD-38A06654C69A@mac.com> From: Chuck Swiger To: Svein Halvor Halvorsen In-Reply-To: <497E41B8.2030203@lvor.halvorsen.cc> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 26 Jan 2009 15:03:44 -0800 References: <497E31EE.9010202@lvor.halvorsen.cc> <0B02CEE8-D38A-4D94-B76D-49721BDDACF0@mac.com> <497E41B8.2030203@lvor.halvorsen.cc> X-Mailer: Apple Mail (2.930.3) X-Brightmail-Tracker: AAAAAA== Cc: 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: Mon, 26 Jan 2009 23:03:45 -0000 On Jan 26, 2009, at 3:05 PM, Svein Halvor Halvorsen wrote: > Do you have a suggestion to solve the following problem without > using printf(1): > > I have a text file that I want to print in a "box" on a terminal > from a shell script. Now I've padded the lines with spaces to a > certain length using printf %-70s and appended the box drawing > character. Is there another simple way that will work with utf-8? My first thought was about dialog(1), but I'm not sure whether that deals with UTF8 any better...? -- -Chuck