xref: /freebsd/contrib/dialog/samples/msgbox4-utf8 (revision 2e3f49888ec8851bafb22011533217487764fdb0)
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
8width=30
9while test $width != 61
10do
11$DIALOG --title "MESSAGE BOX (width $width)" --no-collapse "$@" \
12        --msgbox "\
13This sample is written in UTF-8.
14There 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あいうえおかきくけこさしすせそたちつてとなにぬねの
201234567890123456789012345
21ABCDEFGHIJKLMNOPQRSTUVWXY
22
23Hi, this is a simple message box.  You can use this to \
24display any message you like.  The box will remain until \
25you press the ENTER key." 22 $width
26returncode=$?
27
28case $returncode in
29  $DIALOG_OK)
30    ;;
31  *)
32    . ./report-button;
33    exit
34    ;;
35esac
36
37width=`expr $width + 1`
38
39done
40