commit a034a1756ab0e3b427da010f77eb6d3a06e4813c
parent 3da388108d5aeba9763eb3f06d9d820902dfd5bb
Author: Chris Bracken <chris@bracken.jp>
Date: Tue, 17 Feb 2026 19:08:58 +0900
format: print raw UTF-8 sequence for ellipsis
Avoids relying on potentially compiler-specific behaviour.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/format.c b/src/format.c
@@ -195,7 +195,7 @@ void print_gopher_link_padded(FILE* out,
if (bytes == (size_t)-1 || bytes == (size_t)-2) {
// Invalid (-1) or incomplete (-2) UTF-8. Consume 1 byte.
if (display_width == width - 1 && ptr + 1 < end) {
- fprintf(out, "\u2026");
+ fprintf(out, "\xE2\x80\xA6");
display_width++;
break;
} else if (display_width < width) {
@@ -213,7 +213,7 @@ void print_gopher_link_padded(FILE* out,
// Print ellipsis if one character from max width but more remains.
if (display_width == width - 1 && ptr + bytes < end) {
- fprintf(out, "\u2026");
+ fprintf(out, "\xE2\x80\xA6");
display_width++;
break;
}