mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-05-13 22:54:39 -04:00
VentoyPlugson: Fix the garbled preview json for unicode characters.
This commit is contained in:
parent
9da5a6ce65
commit
44ff3dd8d4
12 changed files with 421 additions and 12 deletions
|
@ -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, '/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue