Patch from "hzluo" <memcache@gmail.com>:

Remove all explicit 8bit characters from the source, to fix compilation
with windows xp under a chinese locale (bug 3496).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18256 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2007-05-10 10:35:57 +00:00
parent 63fca5a1ce
commit aeeac15128
5 changed files with 22 additions and 22 deletions

View File

@ -231,9 +231,9 @@ char alphaCounter(int const n)
char hebrewCounter(int const n)
{
static const char hebrew[22] = {
'ΰ', 'α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ',
'ι', 'λ', 'μ', 'ξ', 'π', 'ρ', 'ς', 'τ', 'φ',
'χ', 'ψ', 'ω', 'ϊ'
'\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', '\xe8',
'\xe9', '\xeb', '\xec', '\xee', '\xf0', '\xf1', '\xf2', '\xf4', '\xf6',
'\xf7', '\xf8', '\xf9', '\xfa'
};
if (n < 1 || n > 22)

View File

@ -674,7 +674,7 @@ Font & Font::lyxRead(Lexer & lex)
} else if (ttok == "noun") {
setNoun(ON);
} else {
lex.printError("Illegal misc type `$$Token´");
lex.printError("Illegal misc type `$$Token'");
}
} else if (tok == "color") {
lex.next();

View File

@ -28,7 +28,7 @@ std::string const getEnv(std::string const & envname);
* guarantee that it is in the form of a unix-style path.
* If the environment variable is not set, then the function returns
* an empty vector.
<EFBFBD>*/
*/
std::vector<std::string> const getEnvPath(std::string const & name);
/** Set the contents of the environment variable @c name to @c value.

View File

@ -207,17 +207,17 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
else if (t.cs() == "\"") {
string const name = p.verbatim_item();
if (name == "a") os << 'ä';
else if (name == "o") os << 'ö';
else if (name == "u") os << 'ü';
else if (name == "A") os << 'Ä';
else if (name == "O") os << 'Ö';
else if (name == "U") os << 'Ü';
if (name == "a") os << '\xe4';
else if (name == "o") os << '\xf6';
else if (name == "u") os << '\xfc';
else if (name == "A") os << '\xc4';
else if (name == "O") os << '\xd6';
else if (name == "U") os << '\xdc';
else os << "\"{" << name << "}";
}
else if (t.cs() == "ss")
os << "ß";
os << "\xdf";
else if (t.cs() == "cr") {
// lyx can't handle \\cr

View File

@ -3,7 +3,7 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author André Pönitz
* \author André Pönitz
* \author Jean-Marc Lasgouttes
*
* Full author contact details are available in file CREDITS.
@ -1647,7 +1647,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
p.skip_spaces();
context.check_layout(os);
string const s = p.verbatim_item();
if (s == "±" || s == "³" || s == "²" || s == "µ")
if (s == "\xb1" || s == "\xb3" || s == "\xb2" || s == "\xb5")
os << s;
else
handle_ert(os, "\\ensuremath{" + s + "}",
@ -2081,12 +2081,12 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
else if (t.cs() == "\"") {
context.check_layout(os);
string const name = p.verbatim_item();
if (name == "a") os << 'ä';
else if (name == "o") os << 'ö';
else if (name == "u") os << 'ü';
else if (name == "A") os << 'Ä';
else if (name == "O") os << 'Ö';
else if (name == "U") os << 'Ü';
if (name == "a") os << '\xe4';
else if (name == "o") os << '\xf6';
else if (name == "u") os << '\xfc';
else if (name == "A") os << '\xc4';
else if (name == "O") os << '\xd6';
else if (name == "U") os << '\xdc';
else handle_ert(os, "\"{" + name + "}", context);
}
@ -2104,7 +2104,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
// subset of LaTeX, so don't parse anything here,
// but use the raw argument.
// Otherwise we would convert \~{\i} wrongly.
// This will of course not translate \~{\ss} to \~{ß},
// This will of course not translate \~{\ss} to \~{ß},
// but that does at least compile and does only look
// strange on screen.
context.check_layout(os);
@ -2115,7 +2115,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
else if (t.cs() == "ss") {
context.check_layout(os);
os << "ß";
os << "\xdf";
skip_braces(p); // eat {}
}