#ifndef UNICODE_H #define UNICODE_H #include "boost/locale/conversion.hpp" #include "interpolate.h" #include "logger.h" struct normalizer { boost::locale::norm_type type; auto operator()(Word word, channelID ch) -> word_data_t { log_debug("normalizing ", kblib::quoted(word.data.at(ch))); if (auto it = word.data.find(ch); it != word.data.end()) { it->second = boost::locale::normalize(it->second, type); } log_debug("to ", kblib::quoted(word.data.at(ch))); return std::move(word.data); } }; #endif // UNICODE_H