Character encoding (Generation I): Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(Testing literal character that had previously caused issues)
 
(20 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{incomplete|needs=French, German, Italian, and Spanish character encodings}}
{{incomplete|needs=Pokémon Stadium encoding. Similar level of detail to English for non-English encodings.}}
The [[Generation I]] games use a proprietary '''character encoding''' to store text data. Versions of the games in different languages may use different encodings, some more different than others.
In the [[Generation I]] [[core series]] games, a proprietary '''[[character encoding]]''' is used to store text data. Different languages use different encodings, although Western language games have very similar encodings to each other.


Fixed-length user-input strings are terminated with 0x50. If a fixed-length string is terminated before using its full capacity, the contents of the remaining space are not specified.
The Generation I encoding is largely similar to the [[Generation II]] [[Character encoding (Generation II)|encoding]].


Note that 0x7F is a space (" "), not empty. All characters that are not control characters print in one character.
==Compatibility==
The exact character encoding differs between languages, although all Western languages use almost-equivalent encodings. The set of [[Text entry (Generation I)|user-enterable characters]] is the same in all Western languages except German; in German, it is also possible to enter some letters with umlauts (<code>ÄÖÜäöü</code>).


In some contexts, some characters may display differently than suggested below. For example, in the character input table, <sup>E</sup><sub>D</sub> is 0xF0 instead of the [[Pokémon Dollar]] symbol, and in the Pokédex (in English), the feet (') and inches (") marks are 0x60 and 0x61.
In the Generation I and II games, the only supported cross-language compatibility is among the Western games. Attempting to trade or battle between a Western language game and a Japanese or Korean game (only the Generation II games are available in Korean) will usually result in some kind of corruption in both games, and is completely disabled in the [[Virtual Console]] releases. Between Western language games, the only text that can be transferred is the player's name, and the [[nickname]]s and [[Original Trainer]]s of their party Pokémon.
 
Due to the encodings of Western language games mostly being compatible, when [[trade|trading]] Pokémon between different Western languages, [[nickname]]s and [[Original Trainer]] names are usually displayed correctly, with the exception of characters with diacritics (such as letters with umlauts, and some characters obtainable in names in the Spanish versions of the Generation II games that cannot be [[Text entry (Generation II)|entered by players]]). The [[Original Trainer]] of Pokémon obtained in [[in-game trade]]s in Generation I is codepoint 0x5D, a control character that prints "TRAINER" in the game's language, meaning that it is automatically translated when traded between languages.
 
The [[Character encoding (Generation II)|Generation II character encoding]] for each language is almost the same as the Generation I encoding, with all user-enterable characters remaining at the same codepoints in both generations. Additionally, the English Generation II games support the letters with umlauts that can be entered in German games, unlike the English Generation I games. This means that trading Pokémon between Generation I and II games of the same language will not affect their nicknames or Original Trainer names.
 
===Poké Transporter===
{{main|Poké Transporter#Character transcoding|Poké Transporter → Character transcoding}}
When transferring a Pokémon from a Generation I or II game via [[Poké Transporter]], its nickname and Original Trainer need to be transcoded from this character encoding to that of [[Pokémon Bank]]. Due to differences in the characters that can be entered or otherwise appear in names in these games and the Generation VII games, some characters are not transcoded to the same characters they represent in these games.
 
==Rendering==
Due to how text is rendered in the Generation I core series games, all non-control characters take up the exact same amount of space (i.e. the games effectively use a {{wp|monospaced font}}). In Western languages, some ligature characters exist to display two characters within the width of one (e.g. the character <code>'s</code> is the same width as <code>s</code>).
 
These same code points are used for both rendering text and other elements. For example, codepoints 0x01 to 0x48 are used for rendering map elements in the overworld, codepoints 0x79-0x7E are {{wp|box-drawing character}}s used to draw the boundaries of text boxes, etc.
 
Some codepoints are used for different characters in different contexts. For example, 0xF0 usually represents the [[Pokémon Dollar]] symbol, but on the text entry interface it displays as <sup>E</sup><sub>D</sub> instead.


==English==
==English==
Bytes with a dark gray background are not used normally in the English games. Characters with a light gray background are holdovers from the Japanese game but that are not used in the English game.
The following represents the baseline values of these characters. In some contexts, many of these characters have their values overwritten.
:{| style="text-align: center; border-collapse: collapse" cellpadding="2px" width="375px"
 
Undefined characters simply print as spaces.
 
{| class="wikitable" style="text-align: center; border-collapse: collapse; white-space: nowrap" cellpadding="2px" width="375px"
|-
|-
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
|-
|-
! 0-
! 0-
| <small>NULL</small> || colspan=15 style="background: #bbb" |
| style="background: #FFD" | {{tt|␀|Null character}} || colspan=15 style="background: #DDD" |
|-
|-
! 1-
! 1-
| colspan=16 rowspan=3 style="background: #bbb" | ''Junk''
| style="background: #DDD" colspan=16 rowspan=3 | ''Map tiles''
|-
|-
! 2-
! 2-
Line 25: Line 44:
|-
|-
! 4-
! 4-
| colspan=8 style="background: #bbb" | || colspan=8 | ''Control characters''
| style="background: #DDD" colspan=9 | || style="background: #FFD" colspan=4 | || style="background: #DDD"|  || style="background: #FFD" colspan=2 |  
|-
|-
! 5-
! 5-
| colspan=16 | ''Control characters''
| style="background: #FFD" colspan=16 | ''Control characters''
|- style="background: #ddd"
|-
! style="background: #fff" | 6-
! 6-
| A || B || C || D || E || F || G || H || I || V || S || L || M || style="background: #fff" | : || {{tt|ぃ|Small hiragana “i”}} || {{tt|ぅ|Small hiragana “u”}}
|style="background: #FEE"| '''A'''
|- style="background: #ddd"
|style="background: #FEE"| '''B'''
! style="background: #fff" | 7-
|style="background: #FEE"| '''C'''
| ‘ || ’ || “ || ” || ・ || || {{tt||Small hiragana “a”}} || {{tt||Small hiragana “e”}} || {{tt||Small hiragana “o”}}
|style="background: #FEE"| '''D'''
| colspan = "6" style="background: #fff" | ''Text box borders''
|style="background: #FEE"| '''E'''
|style="background: #FEE"| '''F'''
|style="background: #FEE"| '''G'''
|style="background: #FEE"| '''H'''
|style="background: #FEE"| '''I'''
|style="background: #FEE"| '''V'''
|style="background: #FEE"| '''S'''
|style="background: #FEE"| '''L'''
|style="background: #FEE"| '''M'''
|style="background: #FEE"| :
|style="background: #FEE"| ぃ
|style="background: #FEE"| ぅ
|-
! 7-
|style="background: #FEE"| ‘
|style="background: #FEE"|
|style="background: #FEE"| “
|style="background: #FEE"| ”
|style="background: #FEE"| ・
|style="background: #FEE"| …
|style="background: #FEE"|
|style="background: #FEE"|
|style="background: #FEE"|
|style="background: #FEE"|
|style="background: #FEE"|
|style="background: #FEE"|
|style="background: #FEE"|
|style="background: #FEE"| ╚
|style="background: #FEE"|
| {{tt|␠|Space}}
|-
|-
! 8-
! 8-
Line 41: Line 89:
|-
|-
! 9-
! 9-
| Q || R || S || T || U || V || W || X || Y || Z || ( || ) || : || ; || [ || ]
| Q || R || S || T || U || V || W || X || Y || Z || ( || ) || ''':''' || ''';''' || [ || ]
|-
|-
! A-
! A-
Line 50: Line 98:
|-
|-
! C-
! C-
| colspan=16 rowspan=2 style="background: #bbb" | ''Junk''
| colspan=16 rowspan=2 style="background: #FEE" | ''Blanks''
|-
|-
! D-
! D-
|-
|-
! E-
! E-
| ' || <sup>P</sup><sub>K</sub> || <sup>M</sup><sub>N</sub> || - || 'r || 'm || ? || ! || . || style="background: #ddd" | {{tt|ァ|Small katakana “a”}} || style="background: #ddd" | {{tt||Small katakana “u”}} || style="background: #ddd" | {{tt|ェ|Small katakana “e”}} || ▷ || ▶ || ▼ || ♂
| ' || <sup>P</sup><sub>K</sub> || <sup>M</sup><sub>N</sub> || - || 'r || 'm || ? || ! || . || ァ || || || ||style="background: #FEE"| ▶ || ▼ || ♂
|-
|-
! F-
! F-
| {{PDollar}} || × || . || / || , || ♀ || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9
|style="background: #FEE"| [[File:Character 0xF0 i.png|Poké Dollar]] || × || . || / || , || ♀ || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9
|}
|}


In the Japanese games (as can be seen below), 0xF2 is distinguishable from 0xE8, with the former meant as a decimal point while the latter is punctuation. Presumably this intention was largely inherited when the English games were made, as most of the game's script uses 0xE8 exclusively; however, 0xF2 appears in the character table for user input, meaning it may appear in user-input names (and, conversely, 0xE8 never should).
;Legend
{{Colorswatch|FFF|Standard text characters}}
{{Colorswatch|FEE|Variable text characters}}
{{Colorswatch|FFD|Control characters}}
{{Colorswatch|DDD|Map tiles}}
 
* Variable text characters are characters whose values are overwritten in certain contexts to render different characters. Their default values are displayed in the table above; alternate possible values are detailed [[#Variable characters|below]].
* Control characters are special code points that either print a particular multi-character string or serve some functional purpose (such as marking the end of a line of text).
* Map tiles are sprites loaded from the current map's tileset. They are usually graphical rather than text.


The full list of characters that are available for user input are: A-Z and a-z, space, and the following: <code>×():;[]{{PK}}{{MN}}-?!♂♀/.,</code>.
The full list of characters that are available for user input are: A-Z and a-z, space, and the following: <code>×():;[]{{PK}}{{MN}}-?!♂♀/.,</code>.
===Notes===
* 0x00 is a {{wp|null character}}, used to mark null values and occasionally used as a delimiter.
* 0x60-0x6C are bold letters leftover from the Japanese version. Only <code>'''V'''</code> and <code>'''S'''</code> are used in the English version, appearing on the VS screen at the start of a link battle.
* 0x6D (default value) and 0x9C are both {{wp|colon}}, but are visually distinct: 0x9C is bold relative to 0x6D. 0x9C is used in almost all cases (including in user input), except in the display of total playtime.
* 0x6E-0x6F, 0x76-0x78, and 0xE9-0xEB are Japanese {{wp|hiragana}} and {{wp|katakana}} leftover in the character table from the Japanese version. They are not used in the English version.
* 0x74 is an {{wp|interpunct}} leftover from the Japanese version. It is not used in the English version.
* 0x79-0x7E are {{wp|box-drawing characters}} used to draw the boundaries of text boxes. In the games themselves, they are rendered with Poké Balls in the corners.
* 0x7F is a {{wp|Space (punctuation)|space}}.
* 0xBB-0xBF and 0xE4-0xE5 represent an apostrophe followed by a letter. These characters are used to render {{wp|Contraction (grammar)|contractions}} and {{wp|English possessive|possessives}} in dialogue, so that the apostrophe does not take up an entire character-width of space.
* 0xC0-0xDF are usually blank, although some parts of the game may load characters in these code points.
** Letters with {{wp|umlaut}}s that are user-enterable in the German version (<code>ÄÖÜäöü</code>) are located at 0xC0-0xC5 in Western languages other than English.
* 0xE8 and 0xF2 are both {{wp|Full stop|periods}} that render identically, though 0xF2 is horizontally offset by one pixel to the right as compared to 0xE8.
** [[#Japanese|In the Japanese games]], the two code points represent visually distinct characters: 0xF2 is a decimal point and 0xE8 is punctuation.
** 0xF2 is used for user input; 0xE8 is used in the name of {{p|Mr. Mime}}.
===Control characters===
Code points within the 0x49-0x5F range (with the exception of code point 0x4D, which defaults to tile 0x4D) are control characters. Instead of loading the tile they would correspond to from VRAM, they execute a piece of code. Additionally, the null code point 0x00 (which is not in this range) can be considered a control character.
There are three main categories of control character:
* Functional: Performs some function other than simply displaying text
* Static display: Prints a fixed string (which may contain multiple characters)
* Variable display: Prints the value of a text variable (which may contain multiple characters)
The static display control character 0x5D "TRAINER" is used as the [[Original Trainer]] of Pokémon obtained in [[in-game trade]]s. Due to being a control character, this means that if the Pokémon is traded to a game in a different language, the Original Trainer is automatically updated to display "TRAINER" in that game's own language.
{| class="wikitable sortable"
! class="unsortable" | Code point
! Short name
! Control type
! Description
|-
| 0x00 || null || none || Marks a null value
|-
| 0x49 || page || Functional || Begins a new Pokédex page
|-
| 0x4A || pkmn || Static display || Prints "<code>{{PK}}{{MN}}</code>"
|-
| 0x4B || _cont || Functional || Stops and waits for confirmation before scrolling the dialogue down by 1
|-
| 0x4C || autocont || Functional || Scroll dialogue down 1 without waiting for confirmation
|-
| 0x4E || next line || Functional || Move 1 line down in dialogue
|-
| 0x4F || bottom line || Functional || Write at the last line of dialogue
|-
| 0x50 || end || Functional || Marks the end of a string
|-
| 0x51 || paragraph || Functional || Begin a new dialogue page with button confirmation
|-
| 0x52 || players name || Variable display || Prints the player's name
|-
| 0x53 || rivals name || Variable display || Prints the [[rival]]'s name
|-
| 0x54 || poke || Static display || Prints "<code>POKé</code>"
|-
| 0x55 || cont || Functional || A variation of 0x4B and 0x4C
|-
| 0x56 || …… || Static display || Prints "<code>……</code>"
|-
| 0x57 || done || Functional || Ends text box
|-
| 0x58 || prompt || Functional || Prompts to end textbox
|-
| 0x59 || target || Variable display || Prints the target of a move. If referring to the opponent's Pokémon, "<code>Enemy </code>" is prepended to the Pokémon's name. Used in battle; outside of battle, it will retain the last value that it stored.
|-
| 0x5A || user || Variable display || Prints the user of a move. If referring to the opponent's Pokémon, "<code>Enemy </code>" is prepended to the Pokémon's name. Used in battle; outside of battle, it will retain the last value that it stored.
|-
| 0x5B || pc || Static display || Prints "<code>PC</code>"
|-
| 0x5C || tm || Static display || Prints "<code>TM</code>"
|-
| 0x5D || trainer || Static display || Prints "<code>TRAINER</code>"
|-
| 0x5E || rocket || Static display || Prints "<code>ROCKET</code>"
|-
| 0x5F || dex || Functional || Prints "<code>.</code>" and ends the Pokédex entry
|}
===Variable characters===
Code points in the 0x60-0x7E range vary depending on the context in which they are rendered. Normally these code points contain the characters listed in the table above, but in certain contexts different characters overwrite them. Even when some characters from this set are replaced, others may remain as their default values.
The alternate tilesets listed below are some of the alternate characters that use these codepoints. They are not necessarily a complete list of all cases in which these codepoints are overwritten.
====HP bar tileset====
This tileset is loaded when the game needs to draw HP bars, such as in battle and on status screens. (Note that screens that load this tileset may load additional tilesets that override some of these characters as well.)
{| class="wikitable"
! Code point
! Original<br />character
! New<br />character
! Notes
|-
| 0x62
| '''C'''
| [[File:Character 0x62 i alt.png|HP: (right half)]]
| Right half of <code>HP:</code> (looks like <code>ↄ:</code>), with left tip of an HP bar
|-
| 0x63
| '''D'''
| [[File:Character 0x63 i alt.png|HP bar segment (empty)]]
| HP bar segment (empty)
|-
| 0x64
| '''E'''
| [[File:Character 0x64 i alt.png|HP bar segment (1/8)]]
| HP bar segment (1/8)
|-
| 0x65
| '''F'''
| [[File:Character 0x65 i alt.png|HP bar segment (1/4)]]
| HP bar segment (1/4)
|-
| 0x66
| '''G'''
| [[File:Character 0x66 i alt.png|HP bar segment (3/8)]]
| HP bar segment (3/8)
|-
| 0x67
| '''H'''
| [[File:Character 0x67 i alt.png|HP bar segment (1/2)]]
| HP bar segment (1/2)
|-
| 0x68
| '''I'''
| [[File:Character 0x68 i alt.png|HP bar segment (5/8)]]
| HP bar segment (5/8)
|-
| 0x69
| '''V'''
| [[File:Character 0x69 i alt.png|HP bar segment (3/4)]]
| HP bar segment (3/4)
|-
| 0x6A
| '''S'''
| [[File:Character 0x6A i alt.png|HP bar segment (7/8)]]
| HP bar segment (7/8)
|-
| 0x6B
| '''L'''
| [[File:Character 0x6B i alt.png|HP bar segment (full)]]
| HP bar segment (full)
|-
| 0x6C
| '''M'''
| [[File:Character 0x6C i alt.png|HP bar right tip]]
| Right tip of an HP bar.
|-
| 0x6D
| :
| [[File:Character 0x6D i alt.png|║]]
| Vertical text box boundary, with the right tip of an HP bar
|-
| 0x6E
| ぃ
| :L
| Abbreviation for "[[Level]]"
|-
| 0x6F
| ぅ
| ◢ <!-- box-drawing character 🭊 is more precise, but won't render for most readers due to being a recent Unicode addition -->
| Upper half arrow pointing left. Used to draw a half box pointing left, such as around the player's Pokémon's HP bar.
|-
| 0x70
| ‘
| to
| Used on the Pokémon summary screen in the [[experience]] to next level display.
|-
| 0x71
| ’
| [[File:Character 0x71 i alt.png|HP: (left half)]]
| Left half of <code>HP:</code> (looks like <code>HI</code>)
|-
| 0x72
| “
| 『
| Japanese thick left quotation mark. Leftover from the Japanese version; unused in the English version.
|-
| 0x73
| ”
| ID
| Used on the Pokémon summary screen in the [[Trainer ID number]] header.
|-
| 0x74
| ・
| №
| Used for Pokédex numbers and in the [[Trainer ID number]] header.
|-
| 0x75
| colspan=2 | ⋯
| ''Unchanged''
|-
| 0x76
| ぁ
| ─
| rowspan=2 | Box-drawing character
|-
| 0x77
| ぇ
| ─
|-
| 0x78
| ぉ
| ◣ <!-- box-drawing character &#x1FB3F; is more precise, but won't render for most readers due to being a recent Unicode addition -->
| Upper half arrow pointing right. Used to draw a half box pointing right, such as around the opposing Pokémon's HP bar.
|-
| 0x79
| colspan=2 | ╔
| rowspan=6 | ''Unchanged''
|-
| 0x7A
| colspan=2 | ═
|-
| 0x7B
| colspan=2 | ╗
|-
| 0x7C
| colspan=2 | ║
|-
| 0x7D
| colspan=2 | ╚
|-
| 0x7E
| colspan=2 | ╝
|}
====Other tilesets====
These are some of the other characters that can replace the default characters in certain tilesets. The following is not a single tileset, but a list of instances of various tilesets that overwrite characters
{| class="wikitable"
! Code point
! Original<br />character
! New<br />character
! Tileset
! Notes
|-
| 0x60
| '''A'''
| ′
| rowspan=2 | Pokédex screen
| Feet unit symbol
|-
| 0x61
| '''B'''
| ″
| Inches unit symbol
|-
| 0x62
| ▶
| ▲
| {{m|Fly}} map
|
|-
| 0x72
| “
| '''P'''
| Status screen
| Bold P used as part of {{PP}}
|-
| 0xF0
| [[File:Character 0xF0 i.png|Poké Dollar]]
| <sup>E</sup><sub>D</sub>
| Text entry screen
| Used as the submit button
|}


===Tilemap sections===
===Tilemap sections===
Line 75: Line 396:
## The range 0xC0-0xDF is reserved for certain areas that need extra space for extra tiles. As such, they are usually unoccupied, so normally only print blank characters. The player info screen is an example of a screen that uses some of this space.
## The range 0xC0-0xDF is reserved for certain areas that need extra space for extra tiles. As such, they are usually unoccupied, so normally only print blank characters. The player info screen is an example of a screen that uses some of this space.
## The range 0xE0-0xFF includes numbers, some symbols, and more user interface characters. The player-enterable characters {{PK}}, {{MN}}, and gender symbols are also stored here.
## The range 0xE0-0xFF includes numbers, some symbols, and more user interface characters. The player-enterable characters {{PK}}, {{MN}}, and gender symbols are also stored here.
===Character codes===
Character codes are within the 0x49-0x5F range, with the exception of 0x4D which defaults to tile 4D.
Control characters work by intercepting the tile that would normally correspond to the control character and instead perform a different action whether it be end the text or print a lengthy message.
====Dialogue control codes====
These control codes control dialogue text placement, paging, etc.
* 0x49 - "page" - Begins a new Pokedex page
* 0x4B - "_cont"- Stops and waits for confirmation before scrolling the dialogue down by 1
* 0x4C - "autocont" - Scroll dialogue down 1 without waiting for confirmation
* 0x4E - "next line" - Move a line down in dialogue
* 0x4F - "bottom line" - Write at the last line of dialogue
* 0x50 - "end" - Marks the end of a string
* 0x51 - "paragraph" - Begin a new dialogue page with button confirmation
* 0x55 - "cont" - A variation of 0x4B and 0x4C
* 0x57 - "done" - Ends text box
* 0x58 - "prompt" - Prompts to end textbox
* 0x5F - "dex" - Displays a period and ends the Pokédex entry
====Variable control codes====
These control codes print text defined elsewhere.
* 0x52 - "players name" - The player's name
* 0x53 - "rivals name" - The [[rival]]'s name
* 0x59 - "target" - In battle, the target of a move. If the dialogue is referring to the opponent's Pokémon, "Enemy " will be prepended to the Pokémon's name; if referring to the player's Pokémon, it will just display the Pokémon's name. Outside of battle, it will retain the last value that was stored in it in-battle.
* 0x5A - "user" - In battle, the user of a move. Just like "target", "Enemy " will be prepended to the name of opposing Pokémon.
====Text control codes====
These control codes print a hardcoded string. They are used to decrease the number of bytes to write common strings while still rendering as the correct number of characters.
* 0x4A - "pkmn" - Prints "{{PK}}{{MN}}"
* 0x54 - "poke" - Prints "Poké"
* 0x56 - "......" - Prints 2 ellipses, "……"
* 0x5B - "pc" - Prints "PC"
* 0x5C - "tm" - Prints "TM"
* 0x5D - "trainer" - Prints "TRAINER"
* 0x5E - "rocket" - Prints "ROCKET"


==French & German==
==French & German==
:{| style="text-align: center; border-collapse: collapse" cellpadding="2px" width="375px"
{| class="wikitable" style="text-align: center; border-collapse: collapse; white-space: nowrap" cellpadding="2px" width="375px"
|-
|-
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
Line 131: Line 413:
|-
|-
! 4-
! 4-
|
|-
|-
! 5-
! 5-
|- style="background: #ddd"
|-
! style="background: #fff" | 6-
! 6-
| A || B || C || D || E || F || G || H || I || V || S || L || M || style="background: #fff" | : || {{tt|ぃ|Small hiragana “i”}} || {{tt|ぅ|Small hiragana “u”}}
|style="background: #ddd"| A
|- style="background: #ddd"
|style="background: #ddd"| B
! style="background: #fff" | 7-
|style="background: #ddd"| C
| ‘ || ’ || “ || ” || ・ || ⋯ || {{tt|ぁ|Small hiragana “a”}} || {{tt|ぇ|Small hiragana “e”}} || {{tt|ぉ|Small hiragana “o”}}
|style="background: #ddd"| D
| colspan = "6" style="background: #fff" | ''Text box borders''
|style="background: #ddd"| E
|style="background: #ddd"| F
|style="background: #ddd"| G
|style="background: #ddd"| H
|style="background: #ddd"| I
|style="background: #ddd"| V
|style="background: #ddd"| S
|style="background: #ddd"| L
|style="background: #ddd"| M
| :
|style="background: #ddd"| {{tt|ぃ|Small hiragana “i”}}
|style="background: #ddd"| {{tt|ぅ|Small hiragana “u”}}
|-
! 7-
|style="background: #ddd"| ‘
|style="background: #ddd"|
|style="background: #ddd"| “
|style="background: #ddd"| ”
|style="background: #ddd"| ・
|style="background: #ddd"| ⋯
|style="background: #ddd"| {{tt|ぁ|Small hiragana “a”}}
|style="background: #ddd"| {{tt|ぇ|Small hiragana “e”}}
|style="background: #ddd"| {{tt|ぉ|Small hiragana “o”}}
| colspan="6" | ''Text box borders''
|-
|-
! 8-
! 8-
Line 168: Line 472:


==Italian & Spanish==
==Italian & Spanish==
:{| style="text-align: center; border-collapse: collapse" cellpadding="2px" width="375px"
{| class="wikitable" style="text-align: center; border-collapse: collapse; white-space: nowrap" cellpadding="2px" width="375px"
|-
|-
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
Line 183: Line 487:
|-
|-
! 4-
! 4-
|
|-
|-
! 5-
! 5-
|- style="background: #ddd"
|-
! style="background: #fff" | 6-
! 6-
| A || B || C || D || E || F || G || H || I || V || S || L || M || style="background: #fff" | : || {{tt|ぃ|Small hiragana “i”}} || {{tt|ぅ|Small hiragana “u”}}
|style="background: #ddd"| A
|- style="background: #ddd"
|style="background: #ddd"| B
! style="background: #fff" | 7-
|style="background: #ddd"| C
| ‘ || ’ || “ || ” || ・ || ⋯ || {{tt|ぁ|Small hiragana “a”}} || {{tt|ぇ|Small hiragana “e”}} || {{tt|ぉ|Small hiragana “o”}}
|style="background: #ddd"| D
| colspan = "6" style="background: #fff" | ''Text box borders''
|style="background: #ddd"| E
|style="background: #ddd"| F
|style="background: #ddd"| G
|style="background: #ddd"| H
|style="background: #ddd"| I
|style="background: #ddd"| V
|style="background: #ddd"| S
|style="background: #ddd"| L
|style="background: #ddd"| M
| :
|style="background: #ddd"| {{tt|ぃ|Small hiragana “i”}}
|style="background: #ddd"| {{tt|ぅ|Small hiragana “u”}}
|-
! 7-
|style="background: #ddd"| ‘
|style="background: #ddd"|
|style="background: #ddd"| “
|style="background: #ddd"| ”
|style="background: #ddd"| ・
|style="background: #ddd"| ⋯
|style="background: #ddd"| {{tt|ぁ|Small hiragana “a”}}
|style="background: #ddd"| {{tt|ぇ|Small hiragana “e”}}
|style="background: #ddd"| {{tt|ぉ|Small hiragana “o”}}
| colspan="6" | ''Text box borders''
|-
|-
! 8-
! 8-
Line 219: Line 545:
|}
|}


 
The lowercase <code>m</code> (0xAC) in the French, German, Italian & Spanish version is stylized differently compared to the English version.
The lowercase 'm' (0xAC) in the French, German, Italian & Spanish version is stylized differently compared to the English version.


==Japanese==
==Japanese==
Technically all characters under 0x60 are control characters, the majority of which have the behavior of causing a specific character from the main font (0x80-0xFF) to be printed with a diacritic in the space above it. Those characters that have different, more complicated functions are detailed below.
Technically all characters under 0x60 are control characters, the majority of which have the behavior of causing a specific character from the main font (0x80-0xFF) to be printed with a diacritic in the space above it. Those characters that have different, more complicated functions are detailed below.


:{| style="text-align: center; border-collapse: collapse" cellpadding="2px" width="375px"
{| class="wikitable" style="text-align: center; border-collapse: collapse; white-space: nowrap" cellpadding="2px" width="375px"
|-style="white-space:nowrap"
|-style="white-space:nowrap"
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
Line 296: Line 621:
* 0x5E: Prints <code>ロケットだん</code> in Japanese games.
* 0x5E: Prints <code>ロケットだん</code> in Japanese games.


{{data structure}}<br>
{{data structure}}
{{Project Games notice|data structure}}
{{Project Games notice|data structure}}

Latest revision as of 02:16, 11 October 2024

050Diglett.png This article is incomplete.
Please feel free to edit this article to add missing information and complete it.
Reason: Pokémon Stadium encoding. Similar level of detail to English for non-English encodings.

In the Generation I core series games, a proprietary character encoding is used to store text data. Different languages use different encodings, although Western language games have very similar encodings to each other.

The Generation I encoding is largely similar to the Generation II encoding.

Compatibility

The exact character encoding differs between languages, although all Western languages use almost-equivalent encodings. The set of user-enterable characters is the same in all Western languages except German; in German, it is also possible to enter some letters with umlauts (ÄÖÜäöü).

In the Generation I and II games, the only supported cross-language compatibility is among the Western games. Attempting to trade or battle between a Western language game and a Japanese or Korean game (only the Generation II games are available in Korean) will usually result in some kind of corruption in both games, and is completely disabled in the Virtual Console releases. Between Western language games, the only text that can be transferred is the player's name, and the nicknames and Original Trainers of their party Pokémon.

Due to the encodings of Western language games mostly being compatible, when trading Pokémon between different Western languages, nicknames and Original Trainer names are usually displayed correctly, with the exception of characters with diacritics (such as letters with umlauts, and some characters obtainable in names in the Spanish versions of the Generation II games that cannot be entered by players). The Original Trainer of Pokémon obtained in in-game trades in Generation I is codepoint 0x5D, a control character that prints "TRAINER" in the game's language, meaning that it is automatically translated when traded between languages.

The Generation II character encoding for each language is almost the same as the Generation I encoding, with all user-enterable characters remaining at the same codepoints in both generations. Additionally, the English Generation II games support the letters with umlauts that can be entered in German games, unlike the English Generation I games. This means that trading Pokémon between Generation I and II games of the same language will not affect their nicknames or Original Trainer names.

Poké Transporter

Main article: Poké Transporter → Character transcoding

When transferring a Pokémon from a Generation I or II game via Poké Transporter, its nickname and Original Trainer need to be transcoded from this character encoding to that of Pokémon Bank. Due to differences in the characters that can be entered or otherwise appear in names in these games and the Generation VII games, some characters are not transcoded to the same characters they represent in these games.

Rendering

Due to how text is rendered in the Generation I core series games, all non-control characters take up the exact same amount of space (i.e. the games effectively use a monospaced font). In Western languages, some ligature characters exist to display two characters within the width of one (e.g. the character 's is the same width as s).

These same code points are used for both rendering text and other elements. For example, codepoints 0x01 to 0x48 are used for rendering map elements in the overworld, codepoints 0x79-0x7E are box-drawing characters used to draw the boundaries of text boxes, etc.

Some codepoints are used for different characters in different contexts. For example, 0xF0 usually represents the Pokémon Dollar symbol, but on the text entry interface it displays as ED instead.

English

The following represents the baseline values of these characters. In some contexts, many of these characters have their values overwritten.

Undefined characters simply print as spaces.

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
0-
1- Map tiles
2-
3-
4-
5- Control characters
6- A B C D E F G H I V S L M :
7-
8- A B C D E F G H I J K L M N O P
9- Q R S T U V W X Y Z ( ) : ; [ ]
A- a b c d e f g h i j k l m n o p
B- q r s t u v w x y z é 'd 'l 's 't 'v
C- Blanks
D-
E- ' PK MN - 'r 'm ? ! .
F- Poké Dollar × . / , 0 1 2 3 4 5 6 7 8 9
Legend
Standard text characters
Variable text characters
Control characters
Map tiles
  • Variable text characters are characters whose values are overwritten in certain contexts to render different characters. Their default values are displayed in the table above; alternate possible values are detailed below.
  • Control characters are special code points that either print a particular multi-character string or serve some functional purpose (such as marking the end of a line of text).
  • Map tiles are sprites loaded from the current map's tileset. They are usually graphical rather than text.

The full list of characters that are available for user input are: A-Z and a-z, space, and the following: ×():;[]PKMN-?!♂♀/.,.

Notes

  • 0x00 is a null character, used to mark null values and occasionally used as a delimiter.
  • 0x60-0x6C are bold letters leftover from the Japanese version. Only V and S are used in the English version, appearing on the VS screen at the start of a link battle.
  • 0x6D (default value) and 0x9C are both colon, but are visually distinct: 0x9C is bold relative to 0x6D. 0x9C is used in almost all cases (including in user input), except in the display of total playtime.
  • 0x6E-0x6F, 0x76-0x78, and 0xE9-0xEB are Japanese hiragana and katakana leftover in the character table from the Japanese version. They are not used in the English version.
  • 0x74 is an interpunct leftover from the Japanese version. It is not used in the English version.
  • 0x79-0x7E are box-drawing characters used to draw the boundaries of text boxes. In the games themselves, they are rendered with Poké Balls in the corners.
  • 0x7F is a space.
  • 0xBB-0xBF and 0xE4-0xE5 represent an apostrophe followed by a letter. These characters are used to render contractions and possessives in dialogue, so that the apostrophe does not take up an entire character-width of space.
  • 0xC0-0xDF are usually blank, although some parts of the game may load characters in these code points.
    • Letters with umlauts that are user-enterable in the German version (ÄÖÜäöü) are located at 0xC0-0xC5 in Western languages other than English.
  • 0xE8 and 0xF2 are both periods that render identically, though 0xF2 is horizontally offset by one pixel to the right as compared to 0xE8.
    • In the Japanese games, the two code points represent visually distinct characters: 0xF2 is a decimal point and 0xE8 is punctuation.
    • 0xF2 is used for user input; 0xE8 is used in the name of Mr. Mime.

Control characters

Code points within the 0x49-0x5F range (with the exception of code point 0x4D, which defaults to tile 0x4D) are control characters. Instead of loading the tile they would correspond to from VRAM, they execute a piece of code. Additionally, the null code point 0x00 (which is not in this range) can be considered a control character.

There are three main categories of control character:

  • Functional: Performs some function other than simply displaying text
  • Static display: Prints a fixed string (which may contain multiple characters)
  • Variable display: Prints the value of a text variable (which may contain multiple characters)

The static display control character 0x5D "TRAINER" is used as the Original Trainer of Pokémon obtained in in-game trades. Due to being a control character, this means that if the Pokémon is traded to a game in a different language, the Original Trainer is automatically updated to display "TRAINER" in that game's own language.

Code point Short name Control type Description
0x00 null none Marks a null value
0x49 page Functional Begins a new Pokédex page
0x4A pkmn Static display Prints "PKMN"
0x4B _cont Functional Stops and waits for confirmation before scrolling the dialogue down by 1
0x4C autocont Functional Scroll dialogue down 1 without waiting for confirmation
0x4E next line Functional Move 1 line down in dialogue
0x4F bottom line Functional Write at the last line of dialogue
0x50 end Functional Marks the end of a string
0x51 paragraph Functional Begin a new dialogue page with button confirmation
0x52 players name Variable display Prints the player's name
0x53 rivals name Variable display Prints the rival's name
0x54 poke Static display Prints "POKé"
0x55 cont Functional A variation of 0x4B and 0x4C
0x56 …… Static display Prints "……"
0x57 done Functional Ends text box
0x58 prompt Functional Prompts to end textbox
0x59 target Variable display Prints the target of a move. If referring to the opponent's Pokémon, "Enemy " is prepended to the Pokémon's name. Used in battle; outside of battle, it will retain the last value that it stored.
0x5A user Variable display Prints the user of a move. If referring to the opponent's Pokémon, "Enemy " is prepended to the Pokémon's name. Used in battle; outside of battle, it will retain the last value that it stored.
0x5B pc Static display Prints "PC"
0x5C tm Static display Prints "TM"
0x5D trainer Static display Prints "TRAINER"
0x5E rocket Static display Prints "ROCKET"
0x5F dex Functional Prints "." and ends the Pokédex entry

Variable characters

Code points in the 0x60-0x7E range vary depending on the context in which they are rendered. Normally these code points contain the characters listed in the table above, but in certain contexts different characters overwrite them. Even when some characters from this set are replaced, others may remain as their default values.

The alternate tilesets listed below are some of the alternate characters that use these codepoints. They are not necessarily a complete list of all cases in which these codepoints are overwritten.

HP bar tileset

This tileset is loaded when the game needs to draw HP bars, such as in battle and on status screens. (Note that screens that load this tileset may load additional tilesets that override some of these characters as well.)

Code point Original
character
New
character
Notes
0x62 C HP: (right half) Right half of HP: (looks like ↄ:), with left tip of an HP bar
0x63 D HP bar segment (empty) HP bar segment (empty)
0x64 E HP bar segment (1/8) HP bar segment (1/8)
0x65 F HP bar segment (1/4) HP bar segment (1/4)
0x66 G HP bar segment (3/8) HP bar segment (3/8)
0x67 H HP bar segment (1/2) HP bar segment (1/2)
0x68 I HP bar segment (5/8) HP bar segment (5/8)
0x69 V HP bar segment (3/4) HP bar segment (3/4)
0x6A S HP bar segment (7/8) HP bar segment (7/8)
0x6B L HP bar segment (full) HP bar segment (full)
0x6C M HP bar right tip Right tip of an HP bar.
0x6D : ║ Vertical text box boundary, with the right tip of an HP bar
0x6E :L Abbreviation for "Level"
0x6F Upper half arrow pointing left. Used to draw a half box pointing left, such as around the player's Pokémon's HP bar.
0x70 to Used on the Pokémon summary screen in the experience to next level display.
0x71 HP: (left half) Left half of HP: (looks like HI)
0x72 Japanese thick left quotation mark. Leftover from the Japanese version; unused in the English version.
0x73 ID Used on the Pokémon summary screen in the Trainer ID number header.
0x74 Used for Pokédex numbers and in the Trainer ID number header.
0x75 Unchanged
0x76 Box-drawing character
0x77
0x78 Upper half arrow pointing right. Used to draw a half box pointing right, such as around the opposing Pokémon's HP bar.
0x79 Unchanged
0x7A
0x7B
0x7C
0x7D
0x7E

Other tilesets

These are some of the other characters that can replace the default characters in certain tilesets. The following is not a single tileset, but a list of instances of various tilesets that overwrite characters

Code point Original
character
New
character
Tileset Notes
0x60 A Pokédex screen Feet unit symbol
0x61 B Inches unit symbol
0x62 Fly map
0x72 P Status screen Bold P used as part of PP
0xF0 Poké Dollar ED Text entry screen Used as the submit button

Tilemap sections

The game sections off various areas of the tilemap loaded into VRAM and each character code directly corresponds to a tile in the tilemap. Not all tiles in the tilemap are accessible via character code, but many are.

  1. VRAM addresses 0x9000 to 0x9480 correspond to a portion of the current tileset of the map. Character codes 0x01 to 0x48 and 0x4D directly correspond to them. For example, while the player is outside, tile #3 is the animated flower so character code 0x03 will place the animated flower in text, but in other locations (such as in battle or in a cave), a completely different tile will be displayed.
    1. Characters 0x49 - 0x5F are also in this same section, but with the exception of 0x4D, they are control characters that link to code rather than the tile they would normally correspond to.
  2. VRAM addresses 0x9600 to 0x97F0 partially corresponds to characters 0x60-0x7F. This is where the user interface tiles are stored, such as bold letters and tiles that are used to draw borders for text boxes and menus. The space character is also in this range. These tiles can sometimes change, meaning that characters that reference them may print out a different tile image; however, they are far more consistent than tiles in the 0x9000 to 0x9480 range.
  3. VRAM addresses 0x8800 to 0x8BF0 corresponds to characters 0x80-0xBF. This is where the main font is placed when rendering text.
  4. VRAM addresses 0x8C00 to 0x8DF0 are split into 2 tile sections:
    1. The range 0xC0-0xDF is reserved for certain areas that need extra space for extra tiles. As such, they are usually unoccupied, so normally only print blank characters. The player info screen is an example of a screen that uses some of this space.
    2. The range 0xE0-0xFF includes numbers, some symbols, and more user interface characters. The player-enterable characters PK, MN, and gender symbols are also stored here.

French & German

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
0-
1- Unsure
2-
3-
4-
5-
6- A B C D E F G H I V S L M :
7- Text box borders
8- A B C D E F G H I J K L M N O P
9- Q R S T U V W X Y Z ( ) : ; [ ]
A- a b c d e f g h i j k l m n o p
B- q r s t u v w x y z à è é ù ß ç
C- Ä Ö Ü ä ö ü ë ï â ô û ê î
D- c' d' j' l' m' n' p' s' 's t' u' y'
E- ' PK MN - + ? ! .
F- $ × . / , 0 1 2 3 4 5 6 7 8 9

Italian & Spanish

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
0-
1- Unsure
2-
3-
4-
5-
6- A B C D E F G H I V S L M :
7- Text box borders
8- A B C D E F G H I J K L M N O P
9- Q R S T U V W X Y Z ( ) : ; [ ]
A- a b c d e f g h i j k l m n o p
B- q r s t u v w x y z à è é ù À Á
C- Ä Ö Ü ä ö ü È É Ì Í Ñ Ò Ó Ù Ú á
D- ì í ñ ò ó ú º & 'd 'l 'm 'r 's 't 'v
E- ' PK MN - ¿ ¡ ? ! .
F- $ × . / , 0 1 2 3 4 5 6 7 8 9

The lowercase m (0xAC) in the French, German, Italian & Spanish version is stylized differently compared to the English version.

Japanese

Technically all characters under 0x60 are control characters, the majority of which have the behavior of causing a specific character from the main font (0x80-0xFF) to be printed with a diacritic in the space above it. Those characters that have different, more complicated functions are detailed below.

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
0- NULL イ゙ エ゙ オ゙
1- ナ゙ ニ゙ ヌ゙ ネ゙ ノ゙ マ゙ ミ゙ ム゙
2- ィ゙ あ゙ い゙ え゙ お゙
3- な゙ に゙ ぬ゙ ね゙ の゙ ま゙
4- ま゚ Control も゚ Control
5- Control characters
6- A B C D E F G H I V S L M
7- Text box borders
8-
9-
A-
B-
C-
D-
E- ? !
F- × . / 0 1 2 3 4 5 6 7 8 9

0xE4 and 0xE5 cause the following character to be printed with that diacritic above it.

Japanese control characters

050Diglett.png This section is incomplete.
Please feel free to edit this section to add missing information and complete it.
Reason: Incomplete or missing functions for control bytes. Alternate defaults in different games/other languages
  • 0x4A: Prints
  • 0x52: Prints the player's name.
  • 0x53: Prints the rival's name.
  • 0x54: Prints ポケモン in Japanese games.
  • 0x59: Prints the inactive Pokémon's name in battle. (In specific circumstances, the game may "pretend" that the inactive Pokémon is actually active and vice versa.)
    • てきの  in Japanese games.
  • 0x5A: Prints the active Pokémon's name in battle. The default value is empty. (In specific circumstances, the game may "pretend" that the active Pokémon is actually inactive and vice versa.)
  • 0x5B: Prints パソコン in Japanese games.
  • 0x5C: Prints わざマシン in Japanese games.
  • 0x5D: Prints トレーナー in Japanese games.
  • 0x5E: Prints ロケットだん in Japanese games.


Data structure in the Pokémon games
General Character encoding
Generation I Pokémon speciesPokémonPoké MartCharacter encodingSave
Generation II Pokémon speciesPokémonTrainerCharacter encoding (Korean) • Save
Generation III Pokémon species (EvolutionPokédexType chart)
Pokémon (substructures) • MoveContestContest moveItem
Trainer TowerBattle FrontierCharacter encoding (GameCube) • Save
Generation IV Pokémon species (EvolutionLearnsets)
PokémonSaveCharacter encoding (Wii)
Generation V–present Character encoding
Generation VIII Save
TCG GB and GB2 Character encoding
Project Games logo.png This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.