Text encodings
Text encodings
There is no single FF7 character table. The engine ships three decoders and they do not agree, so a string is only meaningful together with the section it came from. Decoding field dialogue with the kernel's table produces plausible-looking wrong text, which is the worst failure mode available.
Field text
The field-mode codec is its own. It round-trips all 51,693 retail field strings
byte-identically across the 702 maps in flevel.lgp, which is the check that establishes
it is actually the right table rather than a close one.
Field strings live in section 0 alongside the script bytecode, which is why growing a script moves the string table — see [[technical/opcode/field-script]].
Kernel text
KERNEL.BIN and kernel2.bin use back-reference compression on F9: a marker followed by
an offset and a length pointing backwards into text already emitted. The mechanism is not
documented in the corpus and was recovered empirically; it decodes and re-encodes all
1,680 retail entries.
Practical consequence
Any tool reading FF7 text must know which of the three it is holding. A codec parameter is not optional politeness — picking the wrong one silently yields readable nonsense.
Facts
- Relates to
- Source
- measured
- Status
- verified
- Targets
- pc-1998
- pc-steam
- Updated
- 2026-08-20
technical/encoding/text-codecs