Remove assertion that QString::fromUtf8() and QFile::decodeName() can't handle null
Use CHtmlFormatter::set_sel_range() convenience overload
Apply correct UTF-8 bitmasks in os_next_char()