Browse Source

Fixed handling of CTM data in the editor.

I think also UTF8 should be treated the same, it's also binary data.
alteredq 13 years ago
parent
commit
f6ce5206d2
1 changed files with 16 additions and 1 deletions
  1. 16 1
      editor/index.html

+ 16 - 1
editor/index.html

@@ -94,7 +94,22 @@
 
 				};
 
-				reader.readAsText( file );
+				var binaryFormats = {
+
+					"ctm": true,
+					"utf8": true
+
+				};
+
+				if ( extension in binaryFormats ) {
+
+					reader.readAsBinaryString( file );
+
+				} else {
+
+					reader.readAsText( file );
+
+				}
 
 			}, false );