]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.h
installer: further preparation
[lyx.git] / src / Encoding.h
index e0480df98c46bc5f15ecbb4627e1bb9331a46924..6a1f89c4982a19236b4183a473e3f858243e88bf 100644 (file)
@@ -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(); }