aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2026-02-28 13:55:33 +0200
committerDylan Araps <dylan.araps@gmail.com>2026-02-28 13:55:33 +0200
commitda7ed73dd93601737b4e2ad51cdcdb30743f9809 (patch)
tree8869df97b213c82d90e5db5ee0c5b61c1c40c5bc
parent35850365457e4579894f7deb26d0ed0fba436dc8 (diff)
bin/u8: fix reading of bytes
related to: #2
-rwxr-xr-xbin/u81
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/u8 b/bin/u8
index c14a974..8294ef4 100755
--- a/bin/u8
+++ b/bin/u8
@@ -25,6 +25,7 @@
export LC_ALL=C
a=$1; b=${a#?}; c=${b#?}; d=${c#?}
+unset LC_ALL
a=${a%"$b"} b=${b%"$c"} c=${c%"$d"} d=${d%"${1#????}"}
export $(printf 'a=%d b=%d c=%d d=%d' "'$a" "'$b" "'$c" "'$d")
printf '0x%08X\n' "$((a < 128 ? a : a < 224 ?