Index: /CKEditor/tags/3.1.1/CHANGES.html
===================================================================
--- /CKEditor/tags/3.1.1/CHANGES.html	(revision 5207)
+++ /CKEditor/tags/3.1.1/CHANGES.html	(revision 5208)
@@ -56,5 +56,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4640">#4640</a> : Small optimizations for the fileBrowser plugin.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4583">#4583</a> : The "Target Frame Name" field is now visible when target is set to 'frame' only.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/4863">#4863</a> : Fixing iframedialog's height doesn't stretch to 100%.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4863">#4863</a> : Fixing iframedialog's height doesn't stretch to 100% (except IE Quirks).</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4964">#4964</a> : The BACKSPACE key positioning was not correct in some cases with Firefox.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4980">#4980</a> : Setting border, vspace and hspace of images to zero was not working.</li>
Index: /CKEditor/tags/3.1.1/_dev/fixlineends/fixlineends.bat
===================================================================
--- /CKEditor/tags/3.1.1/_dev/fixlineends/fixlineends.bat	(revision 5207)
+++ /CKEditor/tags/3.1.1/_dev/fixlineends/fixlineends.bat	(revision 5208)
@@ -5,3 +5,3 @@
 ::
 
-php fixlineends.php --excluderegex=/(?:_dev[\\\/]_thirdparty)/ --eolstripwhite --eofnewline --eofstripwhite --nohidden --nosystem ../../
+php fixlineends.php --excluderegex=/(?:_dev[\\\/]_thirdparty)/ --eolstripwhite --eofnewline --eofstripwhite --nohidden --nosystem --fixbom ../../
Index: /CKEditor/tags/3.1.1/_dev/fixlineends/fixlineends.php
===================================================================
--- /CKEditor/tags/3.1.1/_dev/fixlineends/fixlineends.php	(revision 5207)
+++ /CKEditor/tags/3.1.1/_dev/fixlineends/fixlineends.php	(revision 5208)
@@ -64,4 +64,8 @@
 $list["xml"] = CRLF;
 
+$bom = array();
+$bom['asp'] = true;
+$bom['js'] = true;
+
 /**
  * Do not modify anything below
@@ -107,4 +111,9 @@
  */
 $nodotfiles = false;
+/**
+ * If set to true, BOM characters are fixed
+ * @var boolean $fixbom
+ */
+$fixbom = false;
 /**
  * How deep to recurse into subdirectories
@@ -317,4 +326,15 @@
         }
         $new_content .= $line;
+    }
+
+    if ($GLOBALS['fixbom']) {
+        $before_fixing = $new_content;
+        $ext = strtolower(substr($path, strrpos($path, ".") + 1));
+        $new_content = stripUtf8Bom( $new_content );
+        if (!empty($GLOBALS['bom'][$ext])) {
+            $new_content = "\xEF\xBB\xBF" . $new_content; // BOM
+        }
+        if ($new_content != $before_fixing)
+            $modified = true;
     }
 
@@ -353,4 +373,16 @@
 
 /**
+ * Strip BOM from a string
+ * @param string $data
+ */
+function stripUtf8Bom( $data )
+{
+    if ( substr( $data, 0, 3 ) == "\xEF\xBB\xBF" )
+        return stripUtf8Bom(substr_replace( $data, '', 0, 3 )) ;
+
+    return $data ;
+}
+
+/**
  * Fix ending lines in all files at given path
  *
@@ -453,18 +485,21 @@
             use regex to exclude files, preg_match() format expected
 
+       --fixbom
+            fix BOM characters
+
        --help
             display this help and exit
 
        --noarchive
-            if set to true, archive files are skipped (Windows only)
+            skip archive files (Windows only)
 
        --nodotfiles
-            if set to true, dot files are skipped
+            skip dot files
 
        --nohidden
-            if set to true, hidden files are skipped (Windows only)
+            skip hidden files (Windows only)
 
        --nosystem
-            if set to true, system files are skipped (Windows only)
+            skip system files (Windows only)
 
        --maxdepth
@@ -525,4 +560,8 @@
             case '--nodotfiles':
                 $GLOBALS['nodotfiles'] = true;
+                break;
+
+            case '--fixbom':
+                $GLOBALS['fixbom'] = true;
                 break;
 
@@ -572,11 +611,11 @@
 
 if ($_SERVER['argc']>1) {
-	include "../_thirdparty/console_getopt/Getopt.php";
+    include "../_thirdparty/console_getopt/Getopt.php";
 
     if ($windows) {
-        $longoptions = array("eofstripwhite", "eofnewline", "eolstripwhite", "help", "noarchive", "nohidden", "nosystem", "nodotfiles", "maxdepth=", "excluderegex=");
+        $longoptions = array("eofstripwhite", "eofnewline", "eolstripwhite", "help", "noarchive", "nohidden", "nosystem", "nodotfiles", "maxdepth=", "excluderegex=", "fixbom");
     }
     else {
-        $longoptions = array("eofstripwhite", "eofnewline", "eolstripwhite", "help", "nodotfiles", "maxdepth=", "excluderegex=");
+        $longoptions = array("eofstripwhite", "eofnewline", "eolstripwhite", "help", "nodotfiles", "maxdepth=", "excluderegex=", "fixbom");
     }
 
Index: /CKEditor/tags/3.1.1/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/tags/3.1.1/_source/plugins/dialog/plugin.js	(revision 5207)
+++ /CKEditor/tags/3.1.1/_source/plugins/dialog/plugin.js	(revision 5208)
@@ -806,5 +806,5 @@
 							expand : !!contents.expand,
 							padding : contents.padding,
-							style : contents.style || 'width: 100%; height: 100%;'
+							style : contents.style || 'width: 100%;' + ( CKEDITOR.env.ie6Compat ? '' : 'height: 100%;' )
 						}, pageHtml );
 
