feat: support for multiple encodings in CSV files (#5756)

This commit is contained in:
Ariel Leyva
2026-02-14 01:37:28 -05:00
committed by GitHub
parent 88b97def9e
commit f67bccf8c5
11 changed files with 276 additions and 321 deletions

View File

@@ -253,7 +253,7 @@ const hoverNav = ref<boolean>(false);
const autoPlay = ref<boolean>(false);
const previousRaw = ref<string>("");
const nextRaw = ref<string>("");
const csvContent = ref<string>("");
const csvContent = ref<ArrayBuffer | string>("");
const csvError = ref<string>("");
const player = ref<HTMLVideoElement | HTMLAudioElement | null>(null);
@@ -393,7 +393,11 @@ const updatePreview = async () => {
if (fileStore.req.size > CSV_MAX_SIZE) {
csvError.value = t("files.csvTooLarge");
} else {
csvContent.value = fileStore.req.content ?? "";
if (fileStore.req.rawContent != null) {
csvContent.value = fileStore.req.rawContent;
} else {
csvContent.value = fileStore.req.content ?? "";
}
}
}