Skip to content

Fix/utf8 encoding - #4097

Open
IndigoCarmine wants to merge 2 commits into
SasView:mainfrom
IndigoCarmine:fix/utf8-encoding
Open

IndigoCarmine wants to merge 2 commits into
SasView:mainfrom
IndigoCarmine:fix/utf8-encoding

Conversation

@IndigoCarmine

@IndigoCarmine IndigoCarmine commented Aug 25, 2026

Copy link
Copy Markdown

Description

I added the encoding="utf-8" argument so that model source files are explicitly read as UTF-8.

This fixes the UnicodeDecodeError that occurs when building plugin models on Windows systems using a non-UTF-8 locale, such as the Japanese locale.
Fixes #4095

How Has This Been Tested?

Tested the change on Windows with a Japanese locale by building the plugin models.
The build completed successfully without the UnicodeDecodeError using SasView/sasmodels#754.

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No quality gates enabled for this code.

See analysis details in CodeScene

Quality Gate Profile: Custom Configuration
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

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.

UnicodeDecodeError when building a model on a non-UTF-8 Windows locale

1 participant