]> git.lyx.org Git - lyx.git/blobdiff - src/support/docstream.C
remove unused stuff
[lyx.git] / src / support / docstream.C
index 03ee204633f7fb36abafb43094e37c3ca7f18907..525f3673e0a9fa7e2fd43a9d149d99976f0c2951 100644 (file)
@@ -20,7 +20,6 @@
 
 
 using lyx::ucs4_codeset;
-using lyx::ucs2_codeset;
 
 using std::string;
 
@@ -148,10 +147,13 @@ protected:
        }
        virtual int do_max_length() const throw()
        {
-               // UTF8 uses at most 6 bytes to represent one UCS4 code point.
+               // UTF8 uses at most 4 bytes to represent one UCS4 code point
+               // (see RFC 3629). RFC 2279 specifies 6 bytes, but that
+               // information is outdated, and RFC 2279 has been superseded by
+               // RFC 3629.
                // All other encodings encode one UCS4 code point in one byte
                // (and can therefore only encode a subset of UCS4)
-               return utf8_ ? 6 : 1;
+               return utf8_ ? 4 : 1;
        }
 private:
        /// Do the actual conversion. The interface is equivalent to that of