File: mkwidthA

package info (click to toggle)
picolibc 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 31,616 kB
  • sloc: ansic: 312,308; asm: 22,739; perl: 2,414; sh: 1,619; python: 1,019; pascal: 329; exp: 287; makefile: 164; xml: 40; cpp: 10
file content (21 lines) | stat: -rwxr-xr-x 653 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh
# Copyright(c) 2018 Thomas Wolff <towo@towo.net>

# generate WIDTH-A file, listing Unicode characters with width property
# Ambiguous, from EastAsianWidth.txt

if [ ! -r EastAsianWidth.txt ]
then	ln -s /usr/share/unicode/ucd/EastAsianWidth.txt . || exit 1
fi
if [ ! -r UnicodeData.txt ]
then	ln -s /usr/share/unicode/ucd/UnicodeData.txt . || exit 1
fi
if [ ! -r Blocks.txt ]
then	ln -s /usr/share/unicode/ucd/Blocks.txt . || exit 1
fi

sed -e "s,^\([^;]*\);A,\1," -e t -e d EastAsianWidth.txt > width-a-new
rm -f WIDTH-A
echo "# UAX #11: East Asian Ambiguous" > WIDTH-A
PATH="$PATH:." uniset +width-a-new compact >> WIDTH-A
rm -f width-a-new