]> git.lyx.org Git - features.git/commitdiff
Fix bug #7402. Many thanks to Vincent who found the wrong revision.
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 11 Apr 2011 20:11:27 +0000 (20:11 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 11 Apr 2011 20:11:27 +0000 (20:11 +0000)
Read the comment of odocstream in src/support/docstream.h if you want to
know why this fix is correct.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38335 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/docstream.h
src/tex2lyx/text.cpp

index 920eafb5f58b529c579dbbe68247d0997c9a4aa7..0ad670968578d00b07358c75a11ce6aa2677fbe7 100644 (file)
@@ -42,9 +42,9 @@ typedef std::basic_istream<char_type> idocstream;
     \endcode, not \code
     os << c;
     \endcode . The latter will not output the character, but the code point
-    as number. This is because we can't overload operator<< (our character
-    type is not a real type but a typedef). Narrow characters of type char
-    can be output as usual.
+    as number if USE_WCHAR_T is not defined. This is because we can't overload
+    operator<< (our character type is not always a real type but sometimes a
+    typedef). Narrow characters of type char can be output as usual.
  */
 typedef std::basic_ostream<char_type> odocstream;
 
index 0c49bba9dafe85fc0e362e5a3736a6d1a535bc25..4471bffa2e2ccb7943e80de1f5accb3487f734e6 100644 (file)
@@ -410,13 +410,13 @@ bool skip_braces(Parser & p)
 
 
 /// replace LaTeX commands in \p s from the unicodesymbols file with their
-/// unciode points
+/// unicode points
 docstring convert_unicodesymbols(docstring s)
 {
        odocstringstream os;
        for (size_t i = 0; i < s.size();) {
                if (s[i] != '\\') {
-                       os << s[i++];
+                       os.put(s[i++]);
                        continue;
                }
                s = s.substr(i);