aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-09-03 19:59:33 +0000
committerMax Horn2005-09-03 19:59:33 +0000
commit3f2286031a2e67e28a2085ee79013a78728ef40a (patch)
treea852e60dcf4b20c30ec0671b9ab9d6069ecc1302
parent587053118445a1ca3abf849070ab22a25ca2e467 (diff)
downloadscummvm-rg350-3f2286031a2e67e28a2085ee79013a78728ef40a.tar.gz
scummvm-rg350-3f2286031a2e67e28a2085ee79013a78728ef40a.tar.bz2
scummvm-rg350-3f2286031a2e67e28a2085ee79013a78728ef40a.zip
Avoid putting non-ASCII chars into source files
svn-id: r18761
-rw-r--r--common/util.cpp2
-rw-r--r--kyra/font.cpp2
-rw-r--r--sword1/control.cpp6
3 files changed, 8 insertions, 2 deletions
diff --git a/common/util.cpp b/common/util.cpp
index 7db2998e4f..2fb0a19cde 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -124,7 +124,7 @@ const LanguageDescription g_languages[] = {
{"ru", "Russian", RU_RUS},
{"cz", "Czech", CZ_CZE},
{"nl", "Dutch", NL_NLD},
- {"nb", "Norwegian Bokmål", NB_NOR},
+ {"nb", "Norwegian Bokm\xE5l", NB_NOR},
{0, 0, UNK_LANG}
};
diff --git a/kyra/font.cpp b/kyra/font.cpp
index 45c57198c4..6651ba0011 100644
--- a/kyra/font.cpp
+++ b/kyra/font.cpp
@@ -293,7 +293,7 @@ void Font::preRenderAllChars(uint16 offsetTableOffset) {
case 3:
#ifdef DUMP_FILES
- fprintf(dump, "§");
+ fprintf(dump, "\xA7");
#endif
dst[yadd * newChar.width + xadd] = 3;
break;
diff --git a/sword1/control.cpp b/sword1/control.cpp
index 3793e6f022..a519108370 100644
--- a/sword1/control.cpp
+++ b/sword1/control.cpp
@@ -654,6 +654,12 @@ bool Control::getConfirm(const uint8 *title) {
bool Control::keyAccepted(uint8 key) {
// this routine needs changes for Czech keys... No idea how to do that, though.
+ // FIXME: It is not a good idea to put non-ASCII chars into a C source file,
+ // since there is no way to specify which encoding you are using.
+ // It is better to encode them as hex/octal. Although in this particular
+ // case, it seems questionable to do this at all, since we currently
+ // do not at all specify which encoding keyboard events use, so this
+ // check here is probably not portable anyway...
static const char allowedSpecials[] = "éèáàúùäöüÄÖÜß,.:-()?! \"\'";
if (((key >= 'A') && (key <= 'Z')) ||
((key >= 'a') && (key <= 'z')) ||