]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/dialog/samples/msgbox4-utf8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / dialog / samples / msgbox4-utf8
1 #!/bin/sh
2 # $Id: msgbox4-utf8,v 1.10 2010/01/13 10:20:03 tom Exp $
3
4 . ./setup-vars
5
6 . ./setup-utf8
7
8 width=30
9 while test $width != 61
10 do
11 $DIALOG --title "MESSAGE BOX (width $width)" --no-collapse "$@" \
12         --msgbox "\
13 This sample is written in UTF-8.
14 There are several checking points:
15 (1) whether the fullwidth characters are displayed well or not,
16 (2) whether the width of characters are evaluated properly, and
17 (3) whether the character at line-folding is lost or not.
18
19 あいうえおかきくけこさしすせそたちつてとなにぬねの
20 1234567890123456789012345
21 ABCDEFGHIJKLMNOPQRSTUVWXY
22
23 Hi, this is a simple message box.  You can use this to \
24 display any message you like.  The box will remain until \
25 you press the ENTER key." 22 $width
26 retval=$?
27
28 case $retval in
29   $DIALOG_CANCEL)
30     echo "Cancel pressed.";exit;;
31   $DIALOG_ESC)
32     echo "ESC pressed.";exit;;
33 esac
34
35 width=`expr $width + 1`
36
37 done