Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BOM to help excel to detect the file is UTF-8 encoded. #65

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

YenguiSeddik
Copy link
Contributor

@YenguiSeddik YenguiSeddik commented Feb 12, 2024

Copy link
Contributor

@sBouzols sBouzols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOM isn't here to ensure proper encoding.
It's here to help excel, in some versions, to detect the file is UTF-8 encoded.
Please change the name of this PR en squash & commit message accordingly

@@ -190,8 +192,10 @@ public byte[] exportSensitivityResultsAsCsv(UUID resultUuid, SensitivityAnalysis
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
zipOutputStream.putNextEntry(new ZipEntry("sensitivity_result.csv"));

// We add a BOM to indicate that the file is encoded in UTF-8.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please copy the same comment than for SA :

Suggested change
// We add a BOM to indicate that the file is encoded in UTF-8.
// // adding BOM to the beginning of file to help excel in some versions to detect this is UTF-8 encoding bytes

@YenguiSeddik YenguiSeddik changed the title Add bom at the start of csv to ensure proper encoding Add bom to help excel to detect the file is UTF-8 encoded. Feb 12, 2024
@YenguiSeddik YenguiSeddik changed the title Add bom to help excel to detect the file is UTF-8 encoded. Add BOM to help excel to detect the file is UTF-8 encoded. Feb 12, 2024
Copy link

@YenguiSeddik YenguiSeddik merged commit 915fb8d into main Feb 12, 2024
2 checks passed
@YenguiSeddik YenguiSeddik deleted the add_bom_to_csv_to_ensure_encoding branch February 12, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants