[Scummvm-cvs-logs] scummvm master -> 2049f536219e10ea1b5860fb1ce713bc7c63737b

somaen einarjohants at gmail.com
Tue Aug 20 18:33:09 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2049f53621 WINTERMUTE: Replace CP1252-symbol ... with 3 full stops.


Commit: 2049f536219e10ea1b5860fb1ce713bc7c63737b
    https://github.com/scummvm/scummvm/commit/2049f536219e10ea1b5860fb1ce713bc7c63737b
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-08-20T09:31:45-07:00

Commit Message:
WINTERMUTE: Replace CP1252-symbol ... with 3 full stops.

Changed paths:
    engines/wintermute/utils/string_util.cpp



diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp
index 23abb5d..e8e078a 100644
--- a/engines/wintermute/utils/string_util.cpp
+++ b/engines/wintermute/utils/string_util.cpp
@@ -146,26 +146,21 @@ Utf8String StringUtil::wideToUtf8(const WideString &WideStr) {
 	return "";
 }
 
-// Currently this only does Ansi->ISO 8859, and only for carets.
-char simpleAnsiToWide(const AnsiString &str, uint32 &offset) {
-	byte c = str[offset];
-
-	if (c == 146) {
-		offset++;
-		return 39; // Replace right-quote with apostrophe
-	} else {
-		offset++;
-		return c;
-	}
-}
-
 //////////////////////////////////////////////////////////////////////////
 WideString StringUtil::ansiToWide(const AnsiString &str) {
 	// TODO: This function gets called a lot, so warnings like these drown out the usefull information
 	Common::String converted = "";
 	uint32 index = 0;
 	while (index != str.size()) {
-	    converted += simpleAnsiToWide(str, index);
+		byte c = str[index];
+		if (c == 146) {
+			converted += (char)39;  // Replace right-quote with apostrophe
+		} else if (c == 133) {
+			converted += Common::String("..."); // Replace ...-symbol with ...
+		} else {
+			converted += c;
+		}
+		index++;
 	}
 	// using default os locale!
 






More information about the Scummvm-git-logs mailing list