Windows Startup Fix

Installer fails with UnicodeDecodeError: 'utf-8' codec can't decode byte ...? Fixed in two steps, no reinstall

πŸ” Is this your problem?

Typical error (in the black server window, or the launcher output):

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 29: invalid continuation byte
  File "MRRC", line 175, in <module>
    config.read(config_file, encoding='utf-8')

Symptoms:

  • Double-clicking MRRC flashes a console window and the browser never opens;
  • or the launcher stops at "Server exited during startup β€” see messages above.";
  • port 8877 never answers, the Start Menu shortcut does nothing.

Cause in one sentence: the older installers (V6.0.0 – V6.0.2) write MRRC.conf back as GBK (the Chinese Windows ANSI codepage) when saving settings, while the server reads the config strictly as UTF-8. Any non-ASCII content (most commonly a Windows user name with Chinese characters in the path) then aborts startup. This is a file-encoding problem, not a hardware/radio problem β€” your settings and login are not lost.

πŸ“Œ Want to check before changing anything? Run the tool with -DryRun: it only reports, never writes.

πŸš€ One-minute fix (recommended)

1

Download the repair tool

⬇️ mrrc-windows-config-fix.zip (5.6 KB, no install)

2

Extract anywhere

Keep the three files in the same folder:

fix_mrrc_encoding.bat        <- double-click this
fix_and_start_mrrc.bat       <- or this (repair + start)
fix_mrrc_encoding.ps1        <- the actual logic, keep it
3

Double-click fix_and_start_mrrc.bat

It converts the config to UTF-8 (original saved as MRRC.conf.bak) and then starts MRRC:

========================================
  MRRC config encoding repair (Chinese Windows)
========================================
Data directory: C:\Users\<you>\AppData\Local\MRRC
Local ANSI code page: 936

== Converting
  [fix]  MRRC.conf: GB2312 (codepage 936) -> UTF-8 (backup: MRRC.conf.bak)

== Result
  [OK]  1 file repaired
        Restart MRRC from the Start Menu.

πŸ“Œ If Windows SmartScreen blocks it: "More info" β†’ "Run anyway"; or right-click the .bat β†’ Properties β†’ Unblock.

How to start MRRC from now on

Use fix_and_start_mrrc.bat for daily starts (pin a shortcut to it if you like): the old installer writes GBK again whenever you save settings in the web UI, and this script repairs before every start.

⚑ No download: one-line fix

For remote support or when copying files is awkward. Paste into a PowerShell window and press Enter:

$p="$env:LOCALAPPDATA\MRRC\MRRC.conf"; $b=[IO.File]::ReadAllBytes($p); try{[Text.UTF8Encoding]::new($false,$true).GetString($b)|Out-Null; "already UTF-8"}catch{Copy-Item $p "$p.bak" -Force; [IO.File]::WriteAllText($p,[Text.Encoding]::GetEncoding(936).GetString($b),[Text.UTF8Encoding]::new($false)); "repaired to UTF-8 (backup $p.bak)"}

When it prints "repaired to UTF-8", start MRRC from the Start Menu again. The original file stays as MRRC.conf.bak.

πŸ“¦ Installer download

Current Windows installer:

⬇️ MRRC-Setup.exe (V6.1.18, ~45 MB)

Config file %LOCALAPPDATA%\MRRC\MRRC.conf
Login info %LOCALAPPDATA%\MRRC\MRRC Quick Start.txt
Config backup (after repair) %LOCALAPPDATA%\MRRC\MRRC.conf.bak

πŸ“Œ This fix has been built in since V6.0.3 β€” the repair tool below is only needed for older installs. The next build (V6.0.3) bakes the fix in (tolerant config reads that auto-migrate to UTF-8, and UTF-8 writes), so the tool will not be needed.

❓ FAQ

Why does this happen?

Chinese Windows uses GBK as its ANSI codepage. The installer's server writes the config with the locale encoding (GBK) but reads it back as UTF-8. As soon as the config contains non-ASCII characters β€” most commonly C:\Users\εΌ δΈ‰\AppData\Local\MRRC\... β€” the next start fails to decode it.

It broke again after I saved settings in the web UI

Run the repair tool again (the old build rewrites GBK on save), or simply always start with fix_and_start_mrrc.bat β€” it repairs on every start. The permanent fix ships with V6.0.3.

How do I verify it worked?

The tool prints "already UTF-8" when nothing needs doing; or run fix_mrrc_encoding.bat -DryRun for a report only. A healthy start shows Using config file: ... in the server window and serves https://localhost:8877.

Will I lose settings or passwords?

No. The tool only re-encodes bytes (byte β†’ text β†’ UTF-8 bytes); the content is unchanged and the original file is kept as MRRC.conf.bak. The users file (MRRC_users.db) is untouched by default. To roll back, rename the .bak file back to MRRC.conf.

What options does the tool take?

fix_mrrc_encoding.bat -DryRun report only; -IncludeAux also converts MRRC_users.db / memory_channels.json / atr1000_tuner.json; -SelfTest verifies the encoding detection logic.

Still stuck?

Post the full error from the server window on GitHub Issues