On Mon, 11 Sep 2017 00:03:26 +0100, David W Noon wrote:
>
>I have been doing some experiments on rendering Unicode and determining
>the length of rendered text compared to its storage in bytes. I have
>used Paul Gilmartin's 3 lines of text as sample data.
>
>I have 4 programs/scripts, of which 3 work and 1 can never work. The
>working programs are in C and C++, plus a script for zsh (a UNIX shell).
>The script that will never work is for bash (another UNIX shell).
>
Trying the following:
#! /bin/sh
doit() {
        echo; echo ===== $I
"$I" -c "printf \"%-22s+++\n\" \"Hello World.\""
"$I" -c "printf \"%-22s+++\n\" \"Привет мир.\""
"$I" -c "printf \"%-22s+++\n\" \"Bonjour le monde.\""
       }
uname -a
for I in ash ksh dash ash csh tcsh zsh bash sh; do doit "$I"; done

on Linux RaspbPi-3-2700 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 
armv7l GNU/Linux

... only zsh gives a desirable result.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to