M2 Diagnostic: Character Encoding & Normalization Pre-Flight Check
This multi-part exercise tests your ability to detect and repair character encoding corruption (Mojibake), differentiate between reversible decoding errors and irreversible byte destruction, and resolve hidden Unicode normalization mismatches (NFC vs. NFD) across software UI, video games, and linear media assets.
Overview & Objective
Before advancing to Module 3: Software & Data Logic (Plurals, Variables & Placeholders), you must pass this Module 2 Diagnostic Pre-Flight Check.
This multi-part exercise tests your ability to detect and repair character encoding corruption (Mojibake), differentiate between reversible decoding errors and irreversible byte destruction, and resolve hidden Unicode normalization mismatches (NFC vs. NFD) across software UI, video games, and linear media assets.
Scenario Briefing
You are reviewing a global release package for a multi-platform product launch. The quality assurance team has reported major localization defects across three languages:
German Software UI: App buttons and settings menus show garbled double-character strings (
München).Polish Game Localization: Search queries for player profiles fail to match existing database entries despite identical spelling on screen (
Zamość).Spanish Subtitles: Streaming playback renders erratic symbols before inverted punctuation marks (
¡Hola!).
Your task is to open the diagnostic project folder in VS Code, analyze the root cause of each character defect, apply the proper remediation workflow, and verify all files against production standards.
Part 1: Hands-On Diagnostic Execution
Step 1: Environment Setup
Create or open a working folder named
module_2_diagnostic.Open
module_2_diagnosticin Visual Studio Code (Cmd + Oon macOS /Ctrl + K Ctrl + Oon Windows).Ensure the Status Bar is visible at the bottom right of your editor window.
Step 2: Diagnosing & Repairing Asset #1 (Software UI)
File Location:
assets/loc/software/ui_de_diagnostic.jsonDefect: Multi-byte UTF-8 bytes read through an 8-bit single-byte character map.
Open
ui_de_diagnostic.jsonin VS Code and inspect the contents:JSON
ui_de_diagnostic.jsonjson{ "city_label": "München", "action_save": "Änderungen speichern" }Click the encoding indicator in the VS Code Status Bar (or open Command Palette
Change File Encoding).Select Reopen with Encoding type
UTF-8pressEnter.Verify that
Münchencleanly resolves toMünchenandÄnderungenresolves toÄnderungen.Click the encoding indicator again select Save with Encoding
UTF-8.Save the file (
Cmd + S/Ctrl + S).
Step 3: Diagnosing & Repairing Asset #2 (Game UI Search Data)
File Location:
assets/loc/games/player_search_pl.jsonDefect: Decomposed Unicode character form (NFD) breaking exact-match search queries.
Open
player_search_pl.jsonin VS Code and inspect line 3:JSON
player_search_pl.jsonjson{ "player_id": 804, "location": "Zamość" }Use your keyboard left/right arrow keys to navigate through the letters
śandćin"Zamość".Notice that navigating across each accented letter requires two keypresses (base letter + combining mark), confirming that the string is stored in NFD (Decomposed) format.
Replace the decomposed string with the canonical NFC (Precomposed) string:
"Zamość".Test cursor movement across
śandćagain to verify it now takes exactly 1 keypress per character.Verify in the VS Code Find Widget (
Cmd + F/Ctrl + F) that searching forZamość(NFC) yields a match.Save the file.
Step 4: Diagnosing & Repairing Asset #3 (Linear Media Subtitles)
File Location:
assets/loc/media/subtitles_es_diagnostic.vttDefect: Misinterpreted UTF-8 inverted punctuation marks adding leading
Âcharacters.
Open
subtitles_es_diagnostic.vttin VS Code:Code snippet
subtitles_es_diagnostic.vttWEBVTT - Spanish Subtitles 00:00:01.000 --> 00:00:04.000 ¡Bienvenido a la edición especial!Click the encoding indicator in the Status Bar Reopen with Encoding
UTF-8.Verify line 4 resolves to:
¡Bienvenido a la edición especial!.Click the encoding indicator Save with Encoding
UTF-8.Save the file.
Part 2: Auto-Graded Diagnostic Quiz
Answer the following questions based on your completed diagnostic execution.
Loading interactive content…
Diagnostic Verification Checklist
[ ]
ui_de_diagnostic.jsonrendersMünchenandÄnderungencleanly withUTF-8status bar display.[ ]
player_search_pl.jsonuses precomposed NFC characters (Zamość), requiring 1 cursor arrow keypress per character.[ ]
subtitles_es_diagnostic.vttrenders¡Bienvenido a la edición especial!withoutÂartifacts.[ ] All quiz questions answered correctly with 100% score threshold.
Ready to move on?
Mark this lesson complete when you’re ready.