+void TransManager::insert(string const & str, LyXText * text, LCursor & cur)
+{
+ // Go through the character encoding only if the current
+ // encoding (chset_->name()) matches the current font_norm
+ // (lyrxc->font_norm)
+
+ // Is false to speak about "only if" the current encoding will
+ // almost always be equal to font_norm.
+ pair<bool, int> enc = chset_.encodeString(str);
+ if (chset_.getName() != lyxrc.font_norm ||
+ !enc.first) {
+ // Could not find an encoding
+ insertVerbatim(str, text, cur);
+ return;
+ }
+ string const tmp(1, static_cast<char>(enc.second));
+ insertVerbatim(tmp, text, cur);
+}