]> git.lyx.org Git - lyx.git/blobdiff - src/output_xhtml.cpp
Try to disambibuate the use of "xetex". Here, we actually require polyglossia.
[lyx.git] / src / output_xhtml.cpp
index d4aa779fca2986d99b1f0ba315240ac43eefb087..d8299ce5c4511a30df32133583a5f86fde4c6aa1 100644 (file)
@@ -32,6 +32,7 @@
 #include "support/debug.h"
 #include "support/lassert.h"
 #include "support/lstrings.h"
+#include "support/textutils.h"
 
 #include <vector>
 
@@ -128,11 +129,10 @@ docstring cleanAttr(docstring const & str)
        docstring newname;
        docstring::const_iterator it = str.begin();
        docstring::const_iterator en = str.end();
-       for (; it != en; ++it)
-               if (isalnum(*it))
-                       newname += *it;
-               else
-                       newname += '_';
+       for (; it != en; ++it) {
+               char_type const c = *it;
+               newname += isAlnumASCII(c) ? c : char_type('_');
+       }
        return newname; 
 }
 
@@ -292,8 +292,10 @@ XHTMLStream & XHTMLStream::operator<<(char c)
        if (nextraw_) {
                os_ << c;
                nextraw_ = false;
-       } else
-               os_ << html::escapeChar(c);
+       } else {
+               string const d = html::escapeChar(c);
+               os_ << from_ascii(d);
+       }
        return *this;
 }
 
@@ -844,7 +846,7 @@ void makeCommand(Buffer const & buf,
                xs << pbegin->params().labelString();
                closeLabelTag(xs, style);
                // Otherwise the label might run together with the text
-               xs << ' ';
+               xs << from_ascii(" ");
        }
 
        ParagraphList::const_iterator const begin = text.paragraphs().begin();