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

Support Unicode in .function files #66

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gilles-peskine-arm
Copy link
Contributor

In the unit test code generator, use utf-8 when opening text files. Get rid of some cruft dating from the Python 2 days. Fix #64.

PR checklist

  • development PR Mbed-TLS/mbedtls#
  • 3.6 PR Mbed-TLS/mbedtls#

All of our source files are encoded in UTF-8. We have other scripts that
make this assumption. We don't want to depend on the platform encoding.

This fixes a bug whereby non-ASCII characters in .function files led to an
error when writing the generated C file. Fix #64.

Signed-off-by: Gilles Peskine <[email protected]>
We had a home-made FileWrapper class, written in the days of Python 2,
whose main purpose was to add line numbers. Use the standard class fileinput
instead.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review priority-medium Medium priority - this can be reviewed as time permits labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review priority-medium Medium priority - this can be reviewed as time permits
Projects
Status: In Development
Development

Successfully merging this pull request may close these issues.

generate_test_code.py does not support Unicode in .function files
1 participant