Index: src/htmlgen.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/htmlgen.cpp,v
retrieving revision 1.10.4.3
diff -u -r1.10.4.3 htmlgen.cpp
--- src/htmlgen.cpp	17 Mar 2013 20:27:13 -0000	1.10.4.3
+++ src/htmlgen.cpp	18 Mar 2013 18:59:44 -0000
@@ -1294,27 +1294,42 @@
                      m_t << "\\";
                    m_col++;
                    break;
-        // 3 byte multi-byte characters, see util.cpp convertCharEntitiesToUTF8
-        case '\xE2':
-                   m_t << c;
-                   c=*p++;
-                   m_t << c;
-                   c=*p++;
-                   m_t << c;
-                   m_col++;
-                   break;
-        // 2 byte multi-byte characters, see util.cpp convertCharEntitiesToUTF8
-        case '\xC2':
-        case '\xC3':
-        case '\xCE':
-        case '\xCF':
-                   m_t << c;
-                   c=*p++;
-                   m_t << c;
-                   m_col++;
-                   break;
-        default:   m_t << c;    
-                   m_col++;                    
+        default:   if ((c >= '\xC2') && (c <= '\xDF'))
+                   {
+                     // 2 byte multi-byte characters
+                     m_t << c;
+                     c=*p++;
+                     m_t << c;
+                     m_col++;
+                   }
+                   else if ((c >= '\xE0') && (c <= '\xEF'))
+                   {
+                     // 3 byte multi-byte characters
+                     m_t << c;
+                     c=*p++;
+                     m_t << c;
+                     c=*p++;
+                     m_t << c;
+                     m_col++;
+                   }
+                   else if ((c >= '\xF0') && (c <= '\xF4'))
+                   {
+                     // 4 byte multi-byte characters
+                     m_t << c;
+                     c=*p++;
+                     m_t << c;
+                     c=*p++;
+                     m_t << c;
+                     c=*p++;
+                     m_t << c;
+                     m_col++;
+                   }
+                   else
+                   {
+                     // "normal" character
+                     m_t << c;    
+                     m_col++;                    
+                   }
                    break;
       }
     }
Index: src/mangen.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/mangen.cpp,v
retrieving revision 1.4.4.3
diff -u -r1.4.4.3 mangen.cpp
--- src/mangen.cpp	17 Mar 2013 20:27:13 -0000	1.4.4.3
+++ src/mangen.cpp	18 Mar 2013 19:06:48 -0000
@@ -364,7 +364,44 @@
                    col++;
                    break;
         case '\"':  c = '\''; // no break!
-        default:    t << c; firstCol=FALSE; col++; break;
+        default:    if ((c >= '\xC2') && (c <= '\xDF'))
+                    {
+                      // 2 byte multi-byte characters
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      col++;
+                    }
+                    else if ((c >= '\xE0') && (c <= '\xEF'))
+                    {
+                      // 3 byte multi-byte characters
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      col++;
+                    }
+                    else if ((c >= '\xF0') && (c <= '\xF4'))
+                    {
+                      // 4 byte multi-byte characters
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      col++;
+                    }
+                    else
+                    {
+                      // "normal" character
+                      t << c;    
+                      col++;                    
+                    }
+                    firstCol = FALSE;
+                    break;
       }
     }
     //printf("%s",str);fflush(stdout);
Index: src/rtfgen.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/rtfgen.cpp,v
retrieving revision 1.6.4.1
diff -u -r1.6.4.1 rtfgen.cpp
--- src/rtfgen.cpp	17 Mar 2013 20:27:13 -0000	1.6.4.1
+++ src/rtfgen.cpp	18 Mar 2013 19:04:28 -0000
@@ -1800,26 +1800,43 @@
         case '{':   t << "\\{"; col++;          break;
         case '}':   t << "\\}"; col++;          break;
         case '\\':  t << "\\\\"; col++;         break;
-        // 3 byte multi-byte characters, see util.cpp convertCharEntitiesToUTF8
-        case '\xE2':
-                    t << c;
-                    c=*p++;
-                    t << c;
-                    c=*p++;
-                    t << c;
-                    col++;
+        default:    if ((c >= '\xC2') && (c <= '\xDF'))
+                    {
+                      // 2 byte multi-byte characters
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      col++;
+                    }
+                    else if ((c >= '\xE0') && (c <= '\xEF'))
+                    {
+                      // 3 byte multi-byte characters
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      col++;
+                    }
+                    else if ((c >= '\xF0') && (c <= '\xF4'))
+                    {
+                      // 4 byte multi-byte characters
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      c=*p++;
+                      t << c;
+                      col++;
+                    }
+                    else
+                    {
+                      // "normal" character
+                      t << (char)c;    
+                      col++;                    
+                    }
                     break;
-        // 2 byte multi-byte characters, see util.cpp convertCharEntitiesToUTF8
-        case '\xC2':
-        case '\xC3':
-        case '\xCE':
-        case '\xCF':
-                    t << c;
-                    c=*p++;
-                    t << c;
-                    col++;
-                    break;
-        default:    t << (char)c; col++;           break;
       }
     }
   }
Index: src/util.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/util.cpp,v
retrieving revision 1.10.2.3
diff -u -r1.10.2.3 util.cpp
--- src/util.cpp	17 Mar 2013 20:27:13 -0000	1.10.2.3
+++ src/util.cpp	18 Mar 2013 18:48:40 -0000
@@ -5467,13 +5467,6 @@
 
   if (init)
   {
-    // when adding items here with new first byte also adjust:
-    //   file        routine
-    //   =========== =====================
-    //   htmlgen.cpp codify
-    //   mangen.cpp  codify
-    //   rtfgen.cpp  codify
-    //   xmlgen.cpp  writeXMLCodeString
     entityMap.insert("copy",       "\xC2\xA9");
     entityMap.insert("tm",         "\xE2\x84\xA2");
     entityMap.insert("trade",      "\xE2\x84\xA2");
Index: src/xmlgen.cpp
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/xmlgen.cpp,v
retrieving revision 1.7.2.1
diff -u -r1.7.2.1 xmlgen.cpp
--- src/xmlgen.cpp	17 Mar 2013 20:27:13 -0000	1.7.2.1
+++ src/xmlgen.cpp	18 Mar 2013 19:02:07 -0000
@@ -140,26 +140,43 @@
       case '&':  t << "&amp;"; col++;  break;
       case '\'': t << "&apos;"; col++; break; 
       case '"':  t << "&quot;"; col++; break;
-      // 3 byte multi-byte characters, see util.cpp convertCharEntitiesToUTF8
-      case '\xE2':
-                 t << c;
-                 c=*s++;
-                 t << c;
-                 c=*s++;
-                 t << c;
-                 col++;
+      default:   if ((c >= '\xC2') && (c <= '\xDF'))
+                 {
+                   // 2 byte multi-byte characters
+                   t << c;
+                   c=*s++;
+                   t << c;
+                   col++;
+                 }
+                 else if ((c >= '\xE0') && (c <= '\xEF'))
+                 {
+                   // 3 byte multi-byte characters
+                   t << c;
+                   c=*s++;
+                   t << c;
+                   c=*s++;
+                   t << c;
+                   col++;
+                 }
+                 else if ((c >= '\xF0') && (c <= '\xF4'))
+                 {
+                   // 4 byte multi-byte characters
+                   t << c;
+                   c=*s++;
+                   t << c;
+                   c=*s++;
+                   t << c;
+                   c=*s++;
+                   t << c;
+                   col++;
+                 }
+                 else
+                 {
+                   // "normal" character
+                   t << c;    
+                   col++;                    
+                 }
                  break;
-      // 2 byte multi-byte characters, see util.cpp convertCharEntitiesToUTF8
-      case '\xC2':
-      case '\xC3':
-      case '\xCE':
-      case '\xCF':
-                 t << c;
-                 c=*s++;
-                 t << c;
-                 col++;
-                 break;
-      default:   t << c; col++;        break;         
     }
   } 
 }
