From 632ef149e0773fd9b5385db244cd820c32bc465e Mon Sep 17 00:00:00 2001 From: cawtds <38510667+cawtds@users.noreply.github.com> Date: Sun, 24 Nov 2024 20:42:14 +0100 Subject: [PATCH] Handle showdowns apostrophe the same way as ASCII apostrophe (#5712) --- tools/trainerproc/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/trainerproc/main.c b/tools/trainerproc/main.c index b410e810b0..8b939a955f 100644 --- a/tools/trainerproc/main.c +++ b/tools/trainerproc/main.c @@ -1545,6 +1545,7 @@ static void fprint_species(FILE *f, const char *prefix, struct String s) static const unsigned char *male = (unsigned char *)u8"♂"; static const unsigned char *female = (unsigned char *)u8"♀"; static const unsigned char *e_diacritic = (unsigned char *)u8"é"; + static const unsigned char *right_single_quotation_mark = (unsigned char *)u8"’"; for (int i = 0; i < s.string_n; i++) { unsigned char c = s.string[i]; @@ -1562,7 +1563,7 @@ static void fprint_species(FILE *f, const char *prefix, struct String s) underscore = false; fputc(c - 'a' + 'A', f); } - else if (c == '\'' || c == '%') + else if (c == '\'' || c == '%' || is_utf8_character(s, &i, right_single_quotation_mark)) { // Do nothing. }