]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
Cmake build: Prepare for hardening use of external programs
[lyx.git] / src / Encoding.cpp
index 73edc843ff361bfe977441284f67f10d498239e6..acb91f656fbed521208fb55ffe868444ef2cd6ef 100644 (file)
@@ -601,6 +601,16 @@ bool Encodings::isMathAlpha(char_type c)
 }
 
 
+bool Encodings::isUnicodeTextOnly(char_type c)
+{
+       if (isASCII(c) || isMathAlpha(c))
+               return false;
+
+       CharInfoMap::const_iterator const it = unicodesymbols.find(c);
+       return it == unicodesymbols.end() || it->second.mathcommand().empty();
+}
+
+
 Encoding const *
 Encodings::fromLyXName(string const & name, bool allowUnsafe) const
 {