 src/config.xml |  9 +++++++++
 src/util.cpp   | 31 ++++++++++++++++++++++++++++++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/src/config.xml b/src/config.xml
index eff8cff..e652bb9 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -279,6 +279,15 @@ Go to the <a href="commands.html">next</a> section or return to the
 ]]>
       </docs>
     </option>
+    <option type='bool' id='LIMIT_FNAME_WITH_ASCII' defval='1'>
+      <docs>
+<![CDATA[
+ If the \c LIMIT_FNAME_WITH_ASCII tag is set to \c YES,
+ doxygen will escape the filenames named with non ASCII 
+ characters like _xE3_x81_x84 for Unicode U+3044.
+]]>
+      </docs>
+    </option>
     <option type='enum' id='OUTPUT_LANGUAGE' defval='English'>
       <docs>
 <![CDATA[
diff --git a/src/util.cpp b/src/util.cpp
index 545cd43..82f1697 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5142,6 +5142,7 @@ bool hasVisibleRoot(BaseClassList *bcl)
 QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore)
 {
   static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
+  static bool useUnicodeFileNames = !Config_getBool("LIMIT_FNAME_WITH_ASCII");
   static GrowBuf growBuf;
   growBuf.clear();
   char c;
@@ -5177,8 +5178,36 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
       default: 
                 if (c<0)
                 {
-                  static char map[] = "0123456789ABCDEF";
                   char ids[5];
+                  const unsigned char uc = (unsigned char)c;
+                  if (useUnicodeFileNames && uc <= 0xf7)
+                  {
+                    const char* pt = p;
+                    ids[ 0 ] = c;
+                    int l = 0;
+                    l += uc >= 0xc2 ? 2 : 0;
+                    l += uc >= 0xe0 ? 1 : 0;
+                    l += uc >= 0xf0 ? 1 : 0;
+                    for ( int m = 1; m < l; ++m )
+                    {
+                      unsigned char ct = (unsigned char)*pt;
+                      if (0x80 <= ct && ct <= 0xbf)
+                      {
+                        ids[ m ] = *pt++;
+                        continue;
+                      }
+                      l = 0;
+                      break; // for
+                    }
+                    if ( l )
+                    {
+                      ids[ l ] = 0;
+                      growBuf.addStr( ids );
+                      p += l - 1;
+                      break; // switch
+                    }
+                  }
+                  static char map[] = "0123456789ABCDEF";
                   unsigned char id = (unsigned char)c;
                   ids[0]='_';
                   ids[1]='x';
