-/**
- * Convert a QChar into a UCS4 character.
- * This is a hack (it does only make sense for the common part of the UCS4
- * and UTF16 encodings) and should not be used.
- * This does only exist because of performance reasons (a real conversion
- * using iconv is too slow on windows).
- */
-inline char_type const qchar_to_ucs4(QChar const & qchar)
-{
- BOOST_ASSERT(is_utf16(static_cast<char_type>(qchar.unicode())));
- return static_cast<char_type>(qchar.unicode());
-}
-
-
-/**
- * Convert a UCS4 character into a QChar.
- * This is a hack (it does only make sense for the common part of the UCS4
- * and UTF16 encodings) and should not be used.
- * This does only exist because of performance reasons (a real conversion
- * using iconv is too slow on windows).
- */
-inline QChar const ucs4_to_qchar(char_type const ucs4)
-{
- // FIXME: The following cast is not a real conversion but it work
- // for the ucs2 subrange of unicode. Instead of an assertion we should
- // return some special characters that indicates that its display is
- // not supported.
- BOOST_ASSERT(is_utf16(ucs4));
- return QChar(static_cast<unsigned short>(ucs4));
-}
-
-