Skip to content

fixed inconsistent UTF-8 encoding#2330

Merged
sydseter merged 1 commit intoOWASP:masterfrom
Suresh-Krishna-P:utf-8
Feb 22, 2026
Merged

fixed inconsistent UTF-8 encoding#2330
sydseter merged 1 commit intoOWASP:masterfrom
Suresh-Krishna-P:utf-8

Conversation

@Suresh-Krishna-P
Copy link
Copy Markdown
Contributor

Successfully fixed the inconsistent UTF-8 encoding issue in scripts/convert_capec.py.

Closes: #2321

Changes Made:

  • Line 102: Changed encoding="utf8" to encoding="utf-8" in the load_json_file() function

Verification:

  • Confirmed the fix is consistent with the rest of the codebase, which uses "utf-8" encoding in 4 other locations:

    • Line 40: f = open(capec_path / "index.md", "w", encoding="utf-8")
    • Line 61: f = open(capec_path / "index.md", "w", encoding="utf-8")
    • Line 102: with open(filepath, encoding="utf-8") as f: (fixed)
    • Line 112: with open(filepath, "r", encoding="utf-8") as f:

The encoding specification is now consistent throughout the file, using the standard IANA-registered encoding name "utf-8" with hyphen, which improves cross-platform compatibility and code maintainability.

@sydseter
Copy link
Copy Markdown
Collaborator

@Suresh-Krishna-P Pøease update your branch. The build should succeed then.

@sydseter sydseter merged commit 61b7b4a into OWASP:master Feb 22, 2026
16 of 17 checks passed
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.

Fix: Inconsistent UTF-8 Encoding

2 participants