]> git.lyx.org Git - lyx.git/blobdiff - src/support/unicode.h
TR1: check in cmake for GCC version, fallback in checktr1.h for other build systems...
[lyx.git] / src / support / unicode.h
index d81b454502b254505a4c3abc3239d82f4691a1cb..afe0bc5858759398623cb0b8f8e9c80871a46673 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  *
@@ -36,6 +36,11 @@ public:
        int convert(char const * in_buffer, size_t in_size,
                char * out_buffer, size_t max_out_size);
 
+       /// source encoding
+       std::string from() const;
+       /// target encoding
+       std::string to() const;
+
 private:
        /// open iconv.
        /// \return true if the processor is ready to use.
@@ -88,6 +93,8 @@ void ucs4_to_multibytes(char_type ucs4, std::vector<char> & out,
 
 extern char const * ucs4_codeset;
 
+/// How many bytes does one UCS4 code point use at most in encoding \p encoding?
+int max_encoded_bytes(std::string const & encoding);
 
 } // namespace lyx