From 78ba700135e1cc9ab00bf86252fe18bc2db3ee87 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 15 Jan 2025 22:47:16 +0100 Subject: [PATCH] [UDP] l10n_fr_das2: use utf-8 for 2025 campaign --- l10n_fr_das2/models/l10n_fr_das2.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/l10n_fr_das2/models/l10n_fr_das2.py b/l10n_fr_das2/models/l10n_fr_das2.py index d469e563b..e08225620 100644 --- a/l10n_fr_das2/models/l10n_fr_das2.py +++ b/l10n_fr_das2/models/l10n_fr_das2.py @@ -728,16 +728,8 @@ def generate_file_and_attach(self, encryption="prod"): ) file_content = self._prepare_file() - try: - file_content_encoded = file_content.encode("latin1") - except UnicodeEncodeError as e: - raise UserError( - _( - "A special character in the DAS2 file is not in the latin1 " - "table. Please locate this special character and replace " - "it by a standard character and try again." - ) - ) from e + # In 2025, they made it clear (at last !) that the file must be in utf-8 + file_content_encoded = file_content.encode("utf-8") try: file_bytes_result, filename = generate_file(