X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.h;h=6a1f89c4982a19236b4183a473e3f858243e88bf;hb=4db3e641ed6765e005343010cb90ee8af26f8f99;hp=e0480df98c46bc5f15ecbb4627e1bb9331a46924;hpb=7c6a6a05a2410a2fcaaec7255c88ee5b554cbd67;p=lyx.git diff --git a/src/Encoding.h b/src/Encoding.h index e0480df98c..6a1f89c498 100644 --- a/src/Encoding.h +++ b/src/Encoding.h @@ -44,11 +44,13 @@ class Encoding { public: /// Which LaTeX package handles this encoding? enum Package { - none, - inputenc, - CJK, - japanese + none = 1, + inputenc = 2, + CJK = 4, + japanese = 8 }; + /// Represent any of the above packages + static int const any; /// Encoding() {} /// @@ -172,9 +174,12 @@ public: /// Get encoding from LyX name \p name Encoding const * fromLyXName(std::string const & name, bool allowUnsafe = false) const; - /// Get encoding from LaTeX name \p name - Encoding const * - fromLaTeXName(std::string const & name, bool allowUnsafe = false) const; + /// Get encoding from LaTeX name \p name and package \p package + Encoding const * fromLaTeXName(std::string const & name, + int const & package = Encoding::any, bool allowUnsafe = false) const; + /// Get encoding from iconv name \p name and package \p package + Encoding const * fromIconvName(std::string const & name, + int const & package = Encoding::any, bool allowUnsafe = false) const; /// const_iterator begin() const { return encodinglist.begin(); }