From c9211a974c220bf43f2e43e9f5c68dfdccc4cc1c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 11 Jun 2022 23:23:37 -0500 Subject: [PATCH] Update: Add script for generating Unicode Codepoints from integers. A simple script that I am using for generating a range of Unicode Codepoints in the format needed by the generate_unicode.sh script. The private use area is represented by multiple sets of all values within some range. These ranges are a massive list. This script generates these. The only thing I need to do is use a calculator program to convert hex to integer. These integers are then passed to the script as an inclusive range. --- build/scripts/generate_codepoints_from_digits.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 build/scripts/generate_codepoints_from_digits.sh diff --git a/build/scripts/generate_codepoints_from_digits.sh b/build/scripts/generate_codepoints_from_digits.sh new file mode 100644 index 0000000..1bc3410 --- /dev/null +++ b/build/scripts/generate_codepoints_from_digits.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# license: lgpl-2.1-or-later +# programmer: Kevin Day +# +# A simple script for generating code regarding unicode codepoint values. +# +# For example, given the Private Use Area range U+E000 to U+F8FF look like: +# ./generate_codepoints_from_digits.sh 57344 63743 +# + +main() { + local -i first="$1" + local -i last="$2" + + while [[ $first -le $last ]] ; do + printf "U+%04X\n" $first + + let first++ + done +} + +main "$1" "$2" -- 1.8.3.1