printf and utf-8

Chuck Swiger cswiger at mac.com
Mon Jan 26 15:03:45 PST 2009


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



More information about the freebsd-questions mailing list