From: Vincent van Ravesteijn Date: Thu, 26 Apr 2012 14:31:42 +0000 (+0200) Subject: Fix bug #8078: Assertions in xhtml output on Windows X-Git-Tag: 2.0.4~107 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0665673d03c22466b4ad0bc1ac53fef3a37f888c;p=features.git Fix bug #8078: Assertions in xhtml output on Windows (cherry picked from commit 3c0e3c16c8c75524cd25e2fd9f34e2f2e17af150) --- diff --git a/src/Floating.cpp b/src/Floating.cpp index 531a066b2c..513c4fac34 100644 --- a/src/Floating.cpp +++ b/src/Floating.cpp @@ -16,6 +16,7 @@ #include "support/debug.h" #include "support/lstrings.h" +#include "support/textutils.h" using namespace std; @@ -67,9 +68,9 @@ string Floating::defaultCSSClass() const string::const_iterator it = n.begin(); string::const_iterator en = n.end(); for (; it != en; ++it) { - if (!isalpha(*it)) + if (!isAlphaASCII(*it)) d += "_"; - else if (islower(*it)) + else if (isLower(*it)) d += *it; else d += support::lowercase(*it); diff --git a/src/Layout.cpp b/src/Layout.cpp index 1606977779..120f7a2c3e 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -1009,7 +1009,7 @@ string Layout::defaultCSSClass() const d = from_ascii("lyx_"); else d += '_'; - } else if (islower(c)) + } else if (isLower(c)) d += c; else // this is slow, so do it only if necessary diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index dee7e29f7a..c87ebac7b0 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -20,6 +20,7 @@ #include "support/debug.h" #include "support/lstrings.h" +#include "support/textutils.h" #include @@ -426,9 +427,9 @@ string InsetLayout::defaultCSSClass() const string::const_iterator it = n.begin(); string::const_iterator en = n.end(); for (; it != en; ++it) { - if (!isalpha(*it)) + if (!isAlphaASCII(*it)) d += "_"; - else if (islower(*it)) + else if (isLower(*it)) d += *it; else d += support::lowercase(*it); diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp index ae1a3b03ee..e23723ca8d 100644 --- a/src/mathed/InsetMathChar.cpp +++ b/src/mathed/InsetMathChar.cpp @@ -193,7 +193,7 @@ void InsetMathChar::mathmlize(MathStream & ms) const } char const * type = - (isalpha(char_) || Encodings::isMathAlpha(char_)) + (isAlphaASCII(char_) || Encodings::isMathAlpha(char_)) ? "mi" : "mo"; // we don't use MTag and ETag because we do not want the spacing ms << "<" << type << ">" << char_type(char_) << ""; @@ -227,7 +227,7 @@ void InsetMathChar::htmlize(HtmlStream & ms) const return; } - if (isalpha(char_) || Encodings::isMathAlpha(char_)) + if (isAlphaASCII(char_) || Encodings::isMathAlpha(char_)) // we don't use MTag and ETag because we do not want the spacing ms << MTag("i") << char_type(char_) << ETag("i"); else diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 005aa42a04..4a587ee5ea 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -125,7 +125,7 @@ string cleanAttr(string const & str) string::const_iterator it = str.begin(); string::const_iterator en = str.end(); for (; it != en; ++it) - newname += isalnum(*it) ? *it : '_'; + newname += isAlnumASCII(*it) ? *it : '_'; return newname; } diff --git a/status.20x b/status.20x index 46bba5f6bb..0959093c53 100644 --- a/status.20x +++ b/status.20x @@ -75,6 +75,8 @@ What's new * DOCUMENT INPUT/OUTPUT +- Fixed assertions on Windows for XHTML output (bug 8078). + - Fix reconfiguration on Windows when the user directory is a UNC path (bug 8098).