VentoyPlugson: Fix the garbled preview json for unicode characters.

This commit is contained in:
longpanda 2022-11-23 14:27:58 +08:00
parent 9da5a6ce65
commit 44ff3dd8d4
12 changed files with 421 additions and 12 deletions

View file

@ -1,4 +1,13 @@
function VtoyUTF16HexToAscii(hex) {
var str = "";
for (var i = 0; i < hex.length; i += 4) {
str += String.fromCharCode(parseInt(hex.substring(i, i + 4), 16));
}
return str;
}
function ventoy_replace_slash(str) {
var str1 = str.replace(/\\/g, '/');
var str2 = str1.replace(/\/\//g, '/');