git commit -m "fix(models): convert CP1252 ontology files to UTF-8" - #353
Merged
pedropaulofb merged 1 commit intoJul 30, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request converts ontology source files that were encoded as Windows-1252/CP1252 to UTF-8.
The affected files are limited to:
models/**/ontology.jsonmodels/**/ontology.ttlFiles that were already valid UTF-8, including ASCII-only files that are fully UTF-8-compatible, were left unchanged.
No conversion scripts, test utilities, configuration files, generated reports, metadata files, or unrelated repository changes are included in this pull request.
Motivation
The catalog currently contains ontology files using different source encodings. Although ASCII-only files are already valid UTF-8 and require no modification, some files contain CP1252-encoded non-ASCII characters and therefore cannot be decoded strictly as UTF-8.
Standardizing the affected ontology files as UTF-8 improves:
This change does not attempt to infer or rewrite the historical encoding of ASCII-only files. ASCII bytes are already valid UTF-8 bytes, so rewriting those files would provide no benefit.
Encoding classification
Each target file was inspected using its raw bytes.
The classification procedure was:
No probabilistic encoding detector was used to decide which files should be converted.
Conversion method
For every confirmed CP1252 file:
This ensures that the conversion changes only the byte representation of non-ASCII characters and does not change the textual content.
Content preservation
The files were converted directly at the byte/text-encoding level.
JSON and Turtle files were not parsed and reserialized as part of the conversion. In particular, the conversion did not use
json.dump(), RDFLib serialization, or any formatter.The following properties were preserved:
LFandCRLFline endings;The intended change is limited to replacing the CP1252 byte representation of non-ASCII characters with the corresponding UTF-8 byte representation.
Scope
This pull request contains only ontology files that were classified as requiring CP1252-to-UTF-8 conversion.
It does not include:
.pre-commit-config.yaml;ASCII-only files reported as
ASCII_UTF8_COMPATIBLEwere intentionally not modified because their existing bytes already constitute valid UTF-8.Safety measures
Before any file was modified, the complete target set was scanned and classified.
The conversion process was designed to abort before writing when encountering conditions such as:
Converted files were written through temporary files in the same directory and then atomically replaced. The original permission bits were preserved.
Validation performed
The following checks were performed after conversion:
CP1252_CONVERSION_REQUIREDclassifications remained;Verification commands
The final
--applyexecution reported no additional converted files.Expected result
After this change:
models/**/ontology.jsonfiles are valid UTF-8;models/**/ontology.ttlfiles are valid UTF-8;