Bakerversity
Module 2: Respecting Global Alphabets & AccentsLesson 5 of 8

Lab 2.2: Advanced Mojibake Diagnosis & Remediation

Act as a senior localization engineer performing triage on a batch of multi-lingual assets across three verticals (Software UI, Video Games, and Linear Media Subtitles).

Objective

In this hands-on lab, you will act as a senior localization engineer performing triage on a batch of multi-lingual assets across three verticals (Software UI, Video Games, and Linear Media Subtitles). You will analyze pattern signatures to determine whether character corruption is reversible decoding misinterpretation or irreversible byte destruction, recover reversible files using Visual Studio Code, and generate clean UTF-8 production assets.

Required Setup & Prerequisites

  • Editor: Visual Studio Code installed.

  • Working Directory: Open your loc_lab working directory in VS Code.

Step-by-Step Instructions

Step 1: Create the Batch Diagnostic Assets

To practice pattern recognition and triage, create three corrupted localization assets in your working directory.

  1. Open VS Code and navigate to your active workspace.

  2. Inside assets/loc/software/, create ui_de_corrupted.json and paste:

    JSON

    json
    { "welcome_msg": "Willkommen in München!", "btn_save": "Änderungen speichern", "status_ok": "Möglich" }
  3. Inside assets/loc/games/, create dialogue_fr_corrupted.json and paste:

    JSON

    json
    { "npc_01": "C'est l'heure!", "npc_02": "O est la cl?", "btn_exit": "Quitter" }
  4. Inside assets/loc/media/, create subtitles_es_corrupted.vtt and paste:

    Code snippet

    WEBVTT - Spanish Subtitles
    
    00:00:01.000 --> 00:00:04.000
    ¡Hola! ¿Cómo estás?
    
    00:00:04.500 --> 00:00:08.000
    Bienvenido a la edición especial.
  5. Save all three files (Cmd + S on macOS / Ctrl + S on Windows).

Step 2: Triage Asset #1 — German Software UI (ui_de_corrupted.json)

  1. Open assets/loc/software/ui_de_corrupted.json in VS Code.

  2. Inspect the pattern signatures:

    • München instead of München

    • Änderungen instead of Änderungen

    • Möglich instead of Möglich

  3. Diagnosis: Notice that two single-byte characters appear where one accented vowel should be (ü for ü, Ä for Ä, ö for ö). This is the classic signature of a UTF-8 file being read as single-byte Windows-1252 / ISO-8859-1.

  4. Remediation:

    • Click the encoding profile in the Status Bar (bottom right).

    • Select Reopen with Encoding type UTF-8 press Enter.

    • Verification: Observe that München cleanly renders as München.

    • Click the encoding indicator again select Save with Encoding UTF-8.

    • Save the file and rename it to ui_de_clean.json.

Step 3: Triage Asset #2 — French Game Dialogue (dialogue_fr_corrupted.json)

  1. Open assets/loc/games/dialogue_fr_corrupted.json in VS Code.

  2. Inspect the pattern signatures on line 3:

    • "npc_02": "O est la cl?"

  3. Diagnosis: Notice the replacement characters (`` or U+FFFD). The original bytes representing `ù and é` were completely overwritten or stripped by a destructive legacy save operation.

  4. Assessment: This is Irreversible Byte Corruption. Attempting to "Reopen with Encoding" across various profiles (ISO-8859-1, Windows-1252, UTF-8) will not restore the missing letters because the underlying data is gone.

  5. Remediation:

    • Flag the file as unrecoverable via automated re-decoding.

    • Manually re-key the missing characters (ù and é) in VS Code:

      JSON

      json
      { "npc_01": "C'est l'heure!", "npc_02": "Où est la clé?", "btn_exit": "Quitter" }
    • Ensure the status bar displays UTF-8, save the file, and rename it to dialogue_fr_clean.json.

Step 4: Triage Asset #3 — Spanish Subtitles (subtitles_es_corrupted.vtt)

  1. Open assets/loc/media/subtitles_es_corrupted.vtt in VS Code.

  2. Inspect the pattern signatures:

    • ¡Hola! ¿Cómo estás?

  3. Diagnosis: Double-byte UTF-8 character sequences (¡, ¿, ó, á) were interpreted through an 8-bit Latin-1 character map, adding leading  characters before inverted punctuation.

  4. Remediation:

    • Click the status bar encoding indicator select Reopen with Encoding UTF-8.

    • Observe line 4 instantly resolve to: ¡Hola! ¿Cómo estás?

    • Select Save with Encoding UTF-8.

    • Save the file and rename it to subtitles_es_clean.json (or .vtt).

Self-Verification Checklist

Check your remediated assets against these production metrics before completing Lab 2.2:

  • [ ] ui_de_clean.json renders München, Änderungen, and Möglich with zero double-byte artifacts (ü).

  • [ ] dialogue_fr_clean.json is correctly re-keyed to Où est la clé? with valid JSON syntax.

  • [ ] subtitles_es_clean.vtt renders ¡Hola! ¿Cómo estás? without erroneous  characters.

  • [ ] All three production files explicitly display UTF-8 in the VS Code Status Bar.


Ready to move on?

Mark this lesson complete when you’re ready.

→ Sign in to track your progress