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

fix: Specify encoding when writing output file to avoid errors when defaul… #214

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

cepera-ang
Copy link
Contributor

…t target encoding doesn't have all characters

Specify encoding when writing output file to avoid errors when default target encoding doesn't have all characters. utf8 seems like the most universal and supported encoding. Otherwise, the cli fails with encoding errors when input file contains unicode text (basically most files nowadays) and the target system has default encoding set to some one-byte charset like cp1252

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

…t target encoding doesn't have all characters

Specify encoding when writing output file to avoid errors when default target encoding doesn't have all characters. utf8 seems like the most universal and supported encoding. Otherwise, the cli fails with encoding errors when input file contains unicode text (basically most files nowadays) and the target system has default encoding set to some one-byte charset like cp1252

Signed-off-by: Johnny Salazar <[email protected]>
@dolfim-ibm
Copy link
Contributor

@cau-git @vagenas I propose flagging this as fix when merging.

@cenit
Copy link

cenit commented Nov 4, 2024

thanks, I was going to propose something similar to fix an error I was having with UnicodeEncodeError: 'charmap' codec can't encode character '...' in position ...: character maps to <undefined>

@cau-git cau-git changed the title Specify encoding when writing output file to avoid errors when defaul… fix: Specify encoding when writing output file to avoid errors when defaul… Nov 4, 2024
@cau-git cau-git merged commit af323c0 into DS4SD:main Nov 4, 2024
5 checks passed
@cepera-ang cepera-ang deleted the patch-1 branch November 8, 2024 16:29
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.

5 participants