Skip to content

fix: replace em-dashes in translatable strings that mojibake on Windows - #326

Merged
got3nks merged 2 commits into
amule-org:masterfrom
got3nks:fix/em-dash-mojibake
Jul 6, 2026
Merged

fix: replace em-dashes in translatable strings that mojibake on Windows#326
got3nks merged 2 commits into
amule-org:masterfrom
got3nks:fix/em-dash-mojibake

Conversation

@got3nks

@got3nks got3nks commented Jul 6, 2026

Copy link
Copy Markdown

Two _("...") strings contain a UTF-8 em-dash (, bytes E2 80 94). On Windows builds using the system code page for message display (cp1252 for Western European locales), the three-byte UTF-8 sequence is decoded as three separate cp1252 characters and renders as the mojibake â€" instead of the intended dash.

Files affected:

  • src/FirstRunWizard.cpp: "Your peer lists are already in place — nothing to download." (in the Bootstrap page's "everything already downloaded" branch)
  • src/libs/ec/cpp/RemoteConnect.cpp: "External Connection lost — exiting." (stderr from the EC client on socket loss)

Replacing with an ASCII hyphen sidesteps the encoding-round-trip issue entirely and reads identically on Linux / macOS. No other em-dashes exist in translatable strings across the tree (verified via grep -rE '_\("[^"]*—' src/).

Commits:

  1. fix: replace em-dashes in translatable strings that mojibake on Windows - the 2-line source fix.
  2. po: regenerate catalogs after em-dash fix - required by the App-catalogs-in-sync CI check.

got3nks added 2 commits July 6, 2026 22:15
Two _("...") strings contained a UTF-8 em-dash (0xE2 0x80 0x94):

  * FirstRunWizard.cpp:  "Your peer lists are already in place - nothing to download."
  * RemoteConnect.cpp:   "External Connection lost - exiting."

On Windows builds using the system code page for message display
(cp1252 for Western European locales), the three-byte UTF-8 sequence
is decoded as three separate cp1252 characters and renders as the
mojibake "â€"" instead of the intended dash.

Replacing with an ASCII hyphen sidesteps the encoding-round-trip
issue entirely and reads identically on Linux / macOS.
@got3nks
got3nks merged commit 79da951 into amule-org:master Jul 6, 2026
12 checks passed
@got3nks
got3nks deleted the fix/em-dash-mojibake branch July 6, 2026 20:17
got3nks added a commit that referenced this pull request Jul 6, 2026
)

* feat(AppImage): install amulegui launcher + shell shortcuts, fix em-dashes

Two related integration gaps + one string-encoding cleanup in the same
change:

1. amulegui first-class integration
   Previously the first-launch AppImage integration prompt only wrote
   org.amule.aMule.desktop (the monolithic amule variant). Users who
   invoked the AppImage via a `amulegui`-named symlink got amulegui
   running fine (AppRun's argv[0]-dispatch handled it), but no
   dedicated menu entry and no icon binding.

   Extended to also install org.amule.aMule.gui.desktop with Exec=
   pointing at ~/.local/bin/amulegui (the symlink from point 2 below),
   so AppRun's basename dispatch picks amulegui rather than the
   default amule. This also fixes the "amulegui registered as ed2k
   scheme handler opens amule" bug surfaced by #324:
   ProtocolHandlerManager writes the correct .desktop id to
   mimeapps.list, but xdg-mime couldn't find the .gui .desktop and
   silently fell back to amule.

2. Shell command shortcuts
   New InstallCommandSymlinks() iterates the AppRun-recognized names
   (amule, amuled, amulegui, amulecmd, amuleweb, amuleapi, ed2k, cas,
   wxcas, alc, alcc) and creates ~/.local/bin/<name> symlinks for
   each one the AppImage actually bundles. Users can now `amulecmd`,
   `amuled`, etc. straight from a terminal without knowing the
   AppImage path. Skips names that are pre-existing regular files
   (protects a user's distro-packaged binary if they somehow ended
   up under ~/.local/bin); replaces existing symlinks so a re-run
   with a newer AppImage refreshes the target.

3. Fix two user-visible em-dashes that mojibake on Windows
   Same class of bug as #326:
     - src/AppImageIntegration.cpp:222 (the integration prompt itself,
       reported by @got3nks during Ubuntu AppImage testing)
     - src/webapi/App.cpp:342 (amuleapi startup error when bound to a
       non-loopback address with no password set)
   Replaced the em-dashes with hyphens - identical rendering on Linux
   and macOS, no mojibake on Windows.

The integration prompt string is also expanded to mention
~/.local/bin so users know what's being touched.

Related: #324 (URL scheme handler PR that surfaced the amulegui gap).

* po: regenerate catalogs after AppImageIntegration text changes

Picks up the two revised msgids from the feat commit above:
  * the integration-prompt body (now mentions shell shortcuts and
    ~/.local/bin, and the em-dash was replaced with a hyphen)
  * the amuleapi startup-error message (em-dash → hyphen)
  * the log line summarising integration outcome (new %d counter for
    installed shell shortcuts)

Required by the App-catalogs-in-sync CI check per scripts/update-po.sh.
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.

1 participant