Browse Source

Editor: Also add utf8 charset to object/material json export.

Mr.doob 1 year ago
parent
commit
c96c6bd091
2 changed files with 2 additions and 2 deletions
  1. 1 1
      editor/js/Sidebar.Material.js
  2. 1 1
      editor/js/Sidebar.Object.js

+ 1 - 1
editor/js/Sidebar.Material.js

@@ -438,7 +438,7 @@ function SidebarMaterial( editor ) {
 		const left = ( screen.width - 500 ) / 2;
 		const top = ( screen.height - 500 ) / 2;
 
-		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
+		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain;charset=utf-8' } ) );
 		window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );
 
 	} );

+ 1 - 1
editor/js/Sidebar.Object.js

@@ -412,7 +412,7 @@ function SidebarObject( editor ) {
 		const left = ( screen.width - 500 ) / 2;
 		const top = ( screen.height - 500 ) / 2;
 
-		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
+		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain;charset=utf-8' } ) );
 		window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );
 
 	} );