First actual commit

This commit is contained in:
2024-05-02 21:19:44 +01:00
commit a5e08510f0
56 changed files with 19282 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# List all available charsets using iconv
charsets=$(iconv -l)
function buildCharset() {
for ((i=128; i<256; i++)); do
hex=$(printf %x $i)
iconv -f "$1" -t UTF-8 <<< "$(printf "\x$hex")"
done | grep -v "^\s*$"
}
function printCharset() {
mapfile -t chars < <(buildCharset "$1")
counter=0
for c in "${chars[@]}"
do
echo -ne "$c "
counter=$((counter + 1))
if [ $counter == 16 ]; then echo ""; counter=0; fi
done
}
printCharset "CP437"