aboutsummaryrefslogtreecommitdiff
path: root/bin/generate-confusables
diff options
context:
space:
mode:
Diffstat (limited to 'bin/generate-confusables')
-rwxr-xr-xbin/generate-confusables17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/generate-confusables b/bin/generate-confusables
new file mode 100755
index 0000000..a90fc38
--- /dev/null
+++ b/bin/generate-confusables
@@ -0,0 +1,17 @@
1#!/bin/bash
2echo 'package util
3/*
4 * THIS FILE IS AUTOGENERATED
5 * DO NOT EDIT MANUALLY!!!
6 */
7
8var unicodeConfusables = map[rune][]rune{'
9sed 's/#.*$//' | sed 's/;//g' | grep -e '\w' |\
10while IFS=$'\t' read -r -a line
11do
12 key=$(sed 's/ $//' <<<"${line[0]}")
13 value=$(sed 's/ $//' <<<"${line[1]}" | sed 's/ /, 0x/g')
14 echo " 0x$key: []rune{0x$value},"
15done
16echo '}'
17