]> git.lyx.org Git - lyx.git/blobdiff - src/support/unicode.h
Don't allow newline characters in document settings.
[lyx.git] / src / support / unicode.h
index 9a7deb96ece4205cfe240ef91f49837f6efa5411..6e83180c10692edcbe03fcba4af10fb7a6d6c407 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "support/strfwd.h"
 
+#include <cstddef>
 #include <vector>
 
 
@@ -36,6 +37,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 +94,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