~aleteoryx/muditaos

a0956f06a912d6b709b23740aa14bdb6203da6da — Krzysztof Móżdżyński 5 years ago bb21bca
[EGD-3780] Fix emoji insertion
2 files changed, 2 insertions(+), 2 deletions(-)

M module-utils/utf8/UTF8.cpp
M module-utils/utf8/UTF8.hpp
M module-utils/utf8/UTF8.cpp => module-utils/utf8/UTF8.cpp +1 -1
@@ 607,7 607,7 @@ bool UTF8::removeChar(const uint32_t &pos, const uint32_t &count)
// 0000 0080-0000 07FF | 110xxxxx 10xxxxxx
// 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
// 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
bool UTF8::encode(const uint16_t &code, uint32_t &dest, uint32_t &length)
bool UTF8::encode(const uint32_t &code, uint32_t &dest, uint32_t &length)
{

    dest   = 0;

M module-utils/utf8/UTF8.hpp => module-utils/utf8/UTF8.hpp +1 -1
@@ 213,7 213,7 @@ class UTF8
     * @note function returns false if character is within prohibited range - <U+D800, U+DFFF> or above value of
     * U+10FFFF.
     */
    static bool encode(const uint16_t &code, uint32_t &dest, uint32_t &length);
    static bool encode(const uint32_t &code, uint32_t &dest, uint32_t &length);

    /// get utf16_t value from utf8 character
    static uint32_t decode(const char *utf8_char, uint32_t &length);