Typographic Encoding#
Nine Docker commands in the course material use the en-dash β (U+2013, bytes e2 80 93) instead of the ASCII hyphen - as flag prefixes. The two characters are visually indistinguishable in most fonts and on rendered slides, making this class of defect invisible to manual review .
Why It Happens#
Rich-text editors, presentation tools, and word processors routinely auto-substitute -- or a lone - followed by a space with a typographic dash. When course content passes through such tools before landing in source files, the substitution travels with it β silently.
Failure Symptoms#
Two distinct Docker error signatures surface depending on which command is invoked :
| Command shape | Error |
|---|---|
docker run βd β¦ | docker: invalid reference format |
docker exec βit <id> bash | Error response from daemon: No such container: βit |
The docker exec failure is especially disorienting: the shell parser splits βit off as a token, Docker interprets it as a container name, and the actual container ID silently becomes the subcommand. Students get an error message naming a container they never typed and have no obvious path to diagnosis without prior knowledge of this trap.
Affected Locations#
All nine occurrences have been verified byte-by-byte :
| File | Lines | Flags affected |
|---|---|---|
content/code-samples/compose/script.sh | 3β5 | βd, βp, βv |
content/code-samples/compose/start-compose.sh | 3β5 | βd, βp, βv |
content/chapitres/reseaux.adoc | 95, 303 | βd, βnet |
content/chapitres/bonus.adoc | 441 | βit |
script.sh is embedded directly into a course slide via an AsciiDoc include:: directive in content/chapitres/compose.adoc, line 18, so the broken commands are rendered verbatim in the presentation and will fail if copy-pasted by students.
Detection#
| Method | Result |
|---|---|
| Visual review | β Fails β characters look identical |
| Invisible-character checker | β False negative β en-dash is visible, not invisible |
| Byte-level grep | β Only reliable method |
The correct detection pattern :
grep -rnP '[\x{2013}\x{2014}]' content/
This matches both the en-dash (U+2013) and the em-dash (U+2014).
Remediation and Prevention#
Immediate fix: Replace all nine occurrences with ASCII -.
Prevent reintroduction: Add the grep to the verify Make target. Currently that target is a no-op β it only prints "Verify disabled" . The proposed addition from Issue #426:
verify:
@grep -rnP '[\x{2013}\x{2014}]' content/ && echo "Typographic dashes found!" && exit 1 || true
The same check can also be wired as a pre-commit hook or added to CI to block re-introduction at the point of authoring.