From 28d4685d112e5aa256269695d7f06e3797cf9dee 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 1bdfebd8a..955fc377d 100644 --- a/l10n_fr_das2/models/l10n_fr_das2.py +++ b/l10n_fr_das2/models/l10n_fr_das2.py @@ -721,16 +721,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(