A Lord of the Rings fanatic rewrote the encryption system using Tengwar script after claiming ASCII is the language of Mordor. They vanished into the woods with a pointed hat and walking stick leaving behind cryptic runes and a note about wandering. The encryption key appears to be written in languages that predate the invention of computers by several thousand years. Your task: Decode messages written in Tengwar-inspired cipher where each English letter maps to an Elvish character.
Why You're Doing This
You're implementing a substitution cipher using fantasy alphabet characters with proper Unicode handling. This tests character encoding, cipher implementation, pattern recognition, and working with non-Latin character sets. It's like ROT13 but for people who think Tolkien's languages are more secure than modern cryptography.
Take the W
✓ Correctly maps Tengwar-style characters to English letters
✓ Handles Unicode character encoding properly
✓ Preserves case and spacing in decryption
Hard L
✗ Produces garbled output due to encoding issues
✗ Loses information during character translation
✗ Fails on edge cases like punctuation or numbers
Edge Cases
⚠ Mixed Tengwar and English text in same encrypted message
⚠ Unicode variations of the same logical character causing mapping issues
⚠ Encrypted text containing characters not in substitution table
⚠ Text with directional markers or special formatting characters
⚠ Encrypted message that is itself another layer of cipher
Input Format:
Tengwar-style symbol sequences representing encrypted English messages
Expected Output:
Decrypted English text with preserved formatting and structure
Example:
ᴛᴇᴄʜɴᴏʟᴏɢʏ (Tengwar-inspired symbols) → TECHNOLOGY (direct character substitution)