Index: src/doxygen.cpp
===================================================================
--- src/doxygen.cpp	(revision 757)
+++ src/doxygen.cpp	(working copy)
@@ -5759,6 +5759,9 @@
                 }
               }
             }
+			// Must remove any '%' characters from this string, otherwise a warning
+			// for a function "void x(int% n)" crashes.
+			escapeControlCharsInString(warnMsg); 
             warn(root->fileName,root->startLine,warnMsg);
           }
         }
Index: src/message.cpp
===================================================================
--- src/message.cpp	(revision 757)
+++ src/message.cpp	(working copy)
@@ -134,7 +134,6 @@
   }
   // substitute markers by actual values
   QCString msgText = 
-    substitute(
       substitute(
         substitute(
           substitute(
@@ -147,9 +146,7 @@
           "$line",lineSubst
         ),
         "$version",versionSubst
-      ),
-      "%","%%"
-    )+'\n';
+      )+'\n';
 
   // print resulting message
   fprintf(warnFile,"%s",msgText.data());
Index: src/util.cpp
===================================================================
--- src/util.cpp	(revision 757)
+++ src/util.cpp	(working copy)
@@ -4847,6 +4847,23 @@
   return strBuf.get();
 }
 
+void escapeControlCharsInString(QCString& string)
+{
+	for (uint i=0;i<string.length();i++)
+	{
+		if (string[i]=='%')
+		{
+			if (i>0)
+			{
+				if (string[i-1]=='%') // already escaped?
+					continue;
+			}
+			string.insert(i,'%');
+			i++;
+		}
+	}
+}
+
 /*! This function determines the file name on disk of an item
  *  given its name, which could be a class name with template 
  *  arguments, so special characters need to be escaped.
@@ -6407,6 +6424,7 @@
   delete root;
   QCString result = s.data();
   int i=0;
+  int nexti=0;
   int charCnt=0;
   int l=result.length();
   bool addEllipsis=FALSE;
@@ -6417,8 +6435,15 @@
   }
   if (charCnt>=80) // try to truncate the string
   {
-    while ((i=nextUtf8CharPosition(result,l,i))<l && charCnt<100)
+    while ((nexti=nextUtf8CharPosition(result,l,i))<l && charCnt<100)
     {
+		// assume something that was an UTF8 char is not a space (isspace() cannot be called on chars > 127)
+		if (nexti>(i+1)) 
+		{
+			i=nexti;
+			continue;
+		}
+		i=nexti;
       charCnt++;
       if (isspace(result.at(i)))
       {
Index: src/util.h
===================================================================
--- src/util.h	(revision 757)
+++ src/util.h	(working copy)
@@ -303,6 +303,7 @@
                           );
 
 QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore=FALSE);
+void escapeControlCharsInString(QCString& string);
 
 void addGroupListToTitle(OutputList &ol,Definition *d);
 
