|
|
|
@ -314,7 +314,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|
|
|
|
for (MWBase::Journal::TTopicIter i = journal->topicBegin (); i != journal->topicEnd (); ++i)
|
|
|
|
|
{
|
|
|
|
|
Utf8Stream stream (i->first.c_str());
|
|
|
|
|
uint32_t first = Misc::StringUtils::toUpper(stream.peek());
|
|
|
|
|
uint32_t first = toUpper(stream.peek());
|
|
|
|
|
|
|
|
|
|
if (first != character)
|
|
|
|
|
continue;
|
|
|
|
@ -323,6 +323,23 @@ struct JournalViewModelImpl : JournalViewModel
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static uint32_t toUpper(uint32_t ch)
|
|
|
|
|
{
|
|
|
|
|
// Russian alphabet
|
|
|
|
|
if (ch >= 0x0430 && ch < 0x0450)
|
|
|
|
|
ch -= 0x20;
|
|
|
|
|
|
|
|
|
|
// Cyrillic IO character
|
|
|
|
|
if (ch == 0x0451)
|
|
|
|
|
ch -= 0x50;
|
|
|
|
|
|
|
|
|
|
// Latin alphabet
|
|
|
|
|
if (ch >= 0x61 && ch < 0x80)
|
|
|
|
|
ch -= 0x20;
|
|
|
|
|
|
|
|
|
|
return ch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct TopicEntryImpl : BaseEntry <MWDialogue::Topic::TEntryIter, TopicEntry>
|
|
|
|
|
{
|
|
|
|
|
MWDialogue::Topic const & mTopic;
|
|
|
|
|