puemos / hls-downloader

Web Extension for sniffing and downloading HTTP Live streams (HLS)
https://puemos.gitbook.io/hls-downloader/
MIT License
1.77k stars 228 forks source link

Filenames include decomposed chars #344

Open hamletmun opened 1 month ago

hamletmun commented 1 month ago

Describe the bug Files are saved with decomposed Korean chars, for example, "ᄋ", "ᅡ", "ᆫ", "ᄂ", "ᅧ", "ᆼ"

To Reproduce Save files including Korean

Expected behavior Filenames should include composed Korean, for example, "안녕"

Screenshots image

Additional context Probably similar issues with other languages, for example, Spanish filenames that include "á","é","í","ó","ú","ñ" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize

// Decomposed "ᄋ", "ᅡ", "ᆫ", "ᄂ", "ᅧ", "ᆼ"
a = '\u110B\u1161\u11AB\u1102\u1167\u11BC'
for (const c of a) { console.log(c) }

// Composed into '\uC548\uB155' "안녕"
b = a.normalize()
for (const c of b) { console.log(c) }