My Project
unicode.h
1 #ifndef UNICODE_H
2 #define UNICODE_H
3 
4 #include "boost/locale/conversion.hpp"
5 #include "interpolate.h"
6 #include "logger.h"
7 
8 struct normalizer {
9  boost::locale::norm_type type;
10  word_data_t operator()(Word word, channelID ch) {
11  log_debug("normalizing ", kblib::quoted(word.data.at(ch)));
12  if (auto it = word.data.find(ch); it != word.data.end()) {
13  it->second = boost::locale::normalize(it->second, type);
14  }
15  log_debug("to ", kblib::quoted(word.data.at(ch)));
16  return std::move(word.data);
17  }
18 };
19 
20 #endif // UNICODE_H
Definition: interpolate.h:139
Definition: unicode.h:8