Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/engine/core/comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "gameplay/fight/arena.h"
#include "utils/grammar/declensions.h"
#include "gameplay/mechanics/magic_item.h"
#include "utils/native_text.h"

#include "comm.h"

Expand Down Expand Up @@ -2727,9 +2728,17 @@ void perform_act(const char *orig,
*buf = *(i++);
buf++;
}
*buf = a_ucc(*i);
i++;
buf++;
// Заглавной делаем букву целиком, а не первый байт: в UTF-8 русская буква
// двухбайтовая, и a_ucc(*i) портил ведущий байт -- "Волчица" приезжала как
// "?олчица" (issue #3797/#3681).
const std::size_t letter_bytes = native_text::char_bytes(i);
std::string first(i, letter_bytes);
native_text::capitalize_first(first);
for (const char symbol : first) {
*buf = symbol;
++buf;
}
i += letter_bytes;
cap = 0;
}
while ((*buf = *(i++)))
Expand Down
Loading