Skip to content

Fix encoding issue in scenario_config_ELEVATE6p3.csv - #2545

Open
dklein-pik wants to merge 1 commit into
remindmodel:developfrom
dklein-pik:develop
Open

dklein-pik wants to merge 1 commit into
remindmodel:developfrom
dklein-pik:develop

Conversation

@dklein-pik

@dklein-pik dklein-pik commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of this PR

Replace "0x96" with "-" (dash) in description text. The issue happened because the file was encoded in Windows-1252 (ANSI), but R is trying to read it as UTF-8. In Windows-1252, the hexadecimal byte 0x96 represents an en-dash (–). Because 0x96 is not a valid standalone character in UTF-8, R reads it as a raw hexadecimal placeholder (x96) instead of the dash.

Surfaced in AMTs

Failure ('test_01-start.R:49:9'): start.R --test succeeds on all configs / perform start.R --test with scenario_config_ELEVATE6p3.csv
ELV-SSP2-710P-TESTTHAT
   Configuring cfg for ELV-SSP2-710P-TESTTHAT
Error in gsub("\"", "", iscenarios[iscen, "description"]) : 
  input string 1 is invalid
Calls: configureCfg -> iconv -> gsub

Type of change

Parts concerned

  • ◻️ GAMS Code
  • ◻️ R-scripts
  • ◻️ Documentation (GAMS incode documentation, comments, tutorials)
  • ◻️ Input data / CES parameters
  • ◻️ Tests, CI/CD (continuous integration/deployment)
  • ☑️ Configuration (switches in main.gms, default.cfg, and scenario_config*.csv files)
  • ◻️ Other (please give a description)

Impact

  • ☑️ Bug fix
  • ◻️ Refactoring
  • ◻️ Deletion
  • ◻️ Documentation / comments
  • ◻️ New feature
  • ◻️ Change of parameter values or input data (including CES parameters)
  • ◻️ Minor change (default scenarios show only small differences)
  • ◻️ Fundamental change of results of default scenarios

Checklist

  • I executed the automated model tests (make test) after my final commit and all tests pass (FAIL 0)
  • I adjusted the reporting in remind2 if and where it was needed
  • I adjusted the madrat packages (mrremind and other packages involved) for input data generation if and where it was needed
  • My code follows the coding etiquette
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • I updated the CHANGELOG.md correctly (added, changed, fixed, removed, input data/calibration)

Copilot AI balanced review requested due to automatic review settings November 23, 2026 08:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the targeted ELEVATE scenario-description encoding fix.

No open issues 🎉

What changed in this PR

Fixes an encoding issue in the ELEVATE scenario configuration that caused R to reject the ELV-SSP2-710P description during configuration.

Changes:

  • Replaces a Windows-1252 en-dash byte with an ASCII hyphen in the description’s 2020-2100 range.
  • Leaves scenario parameters unchanged.
File Description
config/​scenario_config_ELEVATE6p3.csv Replaces the invalid description character with a UTF-8-compatible hyphen.

Review effort: Balanced

@dklein-pik
dklein-pik requested a review from RahelMA November 23, 2026 08:33
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.

2 participants