]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/dialog/samples/msgbox4-utf8
contrib/tzdata: import tzdata 2023c
[FreeBSD/FreeBSD.git] / contrib / dialog / samples / msgbox4-utf8
1 #!/bin/sh
2 # $Id: msgbox4-utf8,v 1.13 2020/11/26 00:25:37 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 returncode=$?
27
28 case $returncode in
29   $DIALOG_OK)
30     ;;
31   *)
32     . ./report-button;
33     exit
34     ;;
35 esac
36
37 width=`expr $width + 1`
38
39 done