From 53482267677906516c6f818f796fcdf2db33b655 Mon Sep 17 00:00:00 2001 From: supertestnet <58400631+supertestnet@users.noreply.github.com> Date: Wed, 15 Mar 2023 10:54:09 -0500 Subject: [PATCH] Update testnet.html --- testnet.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testnet.html b/testnet.html index e576017..8497887 100644 --- a/testnet.html +++ b/testnet.html @@ -118,7 +118,11 @@ if ( "files" in file ) { file = file.files[ 0 ]; } - sessionStorage[ "mimetype" ] = file.type; + var mimetype = file.type; + if ( mimetype.includes( "text/plain" ) ) { + mimetype += ";charset=utf-8"; + } + sessionStorage[ "mimetype" ] = mimetype; var imgReader = new FileReader(); imgReader.onloadend = function() { resolve( imgReader.result.toString() );