X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.h;h=b23e50b954a94942a435742063410e117e4cefad;hb=6b651f2ad9f698c01993dcc6e340682c279f1c55;hp=99afe269e5b7f7e22416f1967ae310fd3d934fb4;hpb=d88aac0e1f7ae9fa54186c8ea733f2de5e6c18ed;p=lyx.git diff --git a/src/Encoding.h b/src/Encoding.h index 99afe269e5..b23e50b954 100644 --- a/src/Encoding.h +++ b/src/Encoding.h @@ -14,6 +14,7 @@ #define ENCODING_H #include "support/docstring.h" +#include "support/types.h" #include #include @@ -24,6 +25,17 @@ namespace support { class FileName; } class LaTeXFeatures; +class EncodingException : public std::exception { +public: + EncodingException(char_type c); + virtual ~EncodingException() throw() {} + virtual const char * what() const throw(); + + char_type failed_char; + int par_id; + pos_type pos; +}; + /// class Encoding { @@ -145,12 +157,12 @@ public: /** * Is this a known char from some language? * If \p preamble is empty and code point \p c is known to belong - * to a supported language, true is returned and \p preamble is set + * to a supported script, true is returned and \p preamble is set * to the corresponding entry in the unicodesymbols file. * If \p preamble is not empty, a check is made whether code point * \p c is a known character matching the preamble entry. */ - static bool isKnownLangChar(char_type c, std::string & preamble); + static bool isKnownScriptChar(char_type const c, std::string & preamble); /** * Add the preamble snippet needed for the output of \p c to * \p features.