uniLoader/lib/string/mkwidthA
Ivaylo Ivanov a1be36ae02 EXPERIMENTAL: Partially implement NewLib
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2023-07-19 19:37:17 +03:00

21 lines
604 B
Bash

#! /bin/sh
# 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