commit: d1f57068b9f37b2eb47f6e8ba7ee021704b081e3
parent 1a160b0b9b34760b950afee5763564fff6974359
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 2 Dec 2023 03:57:16 +0100
cmd/unicode: Compatibility with hare 2023-11-06
See hare commit d09ea3b720bda1a31ba7bc7aa4095644ba271e6d
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmd/unicode.ha b/cmd/unicode.ha
@@ -51,10 +51,10 @@ fn table(args: []str) void = {
const (cel_width, cel_fmt) = if(max < 0xFFFF) {
// (4 hex, non-break space, 1 char, 2 space) = 8 chars
- yield (8u16, "{:04X} {} ");
+ yield (8u16, "{:.4X} {} ");
} else {
// (8 hex, non-break space, 1 char, 2 space) = 12 chars
- yield (12u16, "{:08X} {} ");
+ yield (12u16, "{:.8X} {} ");
};
match(tsize) {
@@ -85,7 +85,7 @@ fn decode(args: []str) void = {
for(let ri = 0z; ri < len(runes); ri += 1) {
const r = runes[ri]: u32;
// Print as 4 characters min to match UnicodeData.txt formatting
- fmt::printfln("{:04X}", r)!;
+ fmt::printfln("{:.4X}", r)!;
};
};
};