https://wiki.vg/api.php?action=feedcontributions&user=Lunar&feedformat=atomwiki.vg - User contributions [en]2024-03-29T02:09:57ZUser contributionsMediaWiki 1.34.4https://wiki.vg/index.php?title=Chat&diff=17118Chat2021-11-18T21:59:24Z<p>Lunar: Added the font property, which was introduced in 1.16</p>
<hr />
<div>Minecraft supports two-way '''chat''' communication via the [[Protocol#Chat Message (clientbound)|Chat Message]] packet, which support a variety of formatting options. Note that this system isn't exclusive to the Chat Message packet - it's used in several other places (including written books, death messages, window titles, and the like).<br />
<br />
== Current system (JSON Chat) ==<br />
<br />
Chat data is sent in JSON. For most situations, the JSON is strictly parsed, but [https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/stream/JsonReader.html#setLenient(boolean) lenient JSON parsing] is used for the Disconnect packet and for written book text.<br />
<br />
=== Inheritance ===<br />
<br />
Each component can have multiple ''siblings''. Each sibling component inherits properties from the style of its parent, using those styles if they are not defined in the sibling's own style.<br />
<br />
For example, in this component:<br />
<br />
<syntaxhighlight lang="javascript"><br />
{<br />
"text": "foo",<br />
"bold": "true",<br />
"extra": [<br />
{<br />
"text": "bar"<br />
},<br />
{<br />
"text": "baz",<br />
"bold": "false"<br />
},<br />
{<br />
"text": "qux",<br />
"bold": "true"<br />
}]<br />
}<br />
</syntaxhighlight><br />
<br />
The text "foo", "bar", and "qux" are all rendered as bold while "baz" is not.<br />
<br />
=== Schema ===<br />
<br />
Each situation where a component can appear may be either a JSON object (the most common choice), an array, or a JSON primitive (which is converted to a String).<br />
<br />
JSON primitives can be used for components, in which case they are implicitly converted into a String component. Note that it is invalid to have a JSON primitive as the root object, so it is '''not''' valid to merely send the text in quotes. This shorthand is useful for sibling lists, though.<br />
<br />
It is also legal to put a JSON array where a component would go, so long as the array is not empty. The first component in the array is the parent of all of the following components. This can produce unusual behavior with style inheritance, but it is still useful shorthand.<br />
<br />
The most common type of component is a JSON object; the format is as follows:<br />
<br />
==== Shared between all components ====<br />
<br />
All component types have certain fields that represent the style. All of these fields may be skipped, in which case the parent's style will be inherited.<br />
<br />
;<code>bold</code><br />
:Boolean - if <code>true</code>, the component is emboldened.<br />
;<code>italic</code><br />
:Boolean - if <code>true</code>, the component is italicized.<br />
;<code>underlined</code><br />
:Boolean - if <code>true</code>, the component is underlined.<br />
;<code>strikethrough</code><br />
:Boolean - if <code>true</code>, the component is struck out.<br />
;<code>obfuscated</code><br />
:Boolean - if <code>true</code>, the component randomly switches between characters of the same width.<br />
;<code>font</code><br />
:String - You can choose between <code>minecraft:uniform</code> (Unicode font), <code>minecraft:alt</code> (Enchanting table font) or <code>minecraft:default</code> (the default font, which switches based on the user's texture pack). This option is only valid on 1.16+, otherwise the property is ignored.<br />
;<code>color</code><br />
:String - contains the color for the component. Should be one of the normal [[#Colors|colors]], but can also be a [[#Styles|format code]] (however, the fields relating to styles should be used instead for that purpose) or any valid [https://en.wikipedia.org/wiki/Web_colors web color](since 1.16.x). If not present (or set to <code>reset</code>), then the default color for the text will be used, which varies by the situation (in some cases, it is white; in others, it is black; in still others, it is a shade of gray that isn't normally used on text).<br />
;<code>insertion</code><br />
:String - contains text to insert. Only used for messages in chat. When shift is held, clicking the component <em>inserts</em> the given text into the chat box at the cursor (potentially replacing selected text). Has no effect on other locations at this time.<br />
;<code>clickEvent</code><br />
:JSON object - Defines an event that occurs when this component is clicked. Contains an <code>action</code> key and a <code>value</code> key. <code>value</code> is internally handled as a String, although it can be any type of JSON primitive.<br />
:;<code>open_url</code><br />
::Opens the given URL in the default web browser. Ignored if the player has opted to disable links in chat; may open a GUI prompting the user if the setting for that is enabled. The link's protocol must be set and must be <code>http</code> or <code>https</code>, for security reasons.<br />
:;<s><code>open_file</code></s><br />
::<strong>Cannot be used within JSON chat</strong>. Opens a link to any protocol, but cannot be used in JSON chat for security reasons. Only exists to internally implement links for screenshots.<br />
:;<code>run_command</code><br />
::Runs the given command. Not required to be a command - clicking this only causes the client to send the given content as a chat message, so if not prefixed with <code>/</code>, they will say the given text instead. If used in a book GUI, the GUI is closed after clicking.<br />
:;<s><code>twitch_user_info</code></s><br />
::<strong>No longer supported; cannot be used within JSON chat</strong>. Only usable in 1.8 and below; twitch support was removed in 1.9. Additionally, this is only used internally by the client. On click, opens a twitch user info GUI screen. Value should be the twitch user name.<br />
:;<code>suggest_command</code><br />
::Only usable for messages in chat. Replaces the content of the chat box with the given text - usually a command, but it is not required to be a command (commands should be prefixed with <code>/</code>).<br />
:;<code>change_page</code><br />
::Only usable within written books. Changes the page of the book to the given page, starting at 1. For instance, <code>"value":1</code> switches the book to the first page. If the page is less than one or beyond the number of pages in the book, the event is ignored.<br />
:;<code>copy_to_clipboard</code><br />
::Copies the given text to the client's clipboard when clicked.<br />
;<code>hoverEvent</code><br />
:JSON object - Defines an event that occurs when this component hovered over. Contains an <code>action</code> key and a <code>value</code> key; action is a String and value is a text component. However, since text components can be serialized as primitives as well as arrays and objects, this can directly be a String. A list of actions:<br />
:;<code>show_text</code><br />
::The text to display. Can either be a string directly (<code>"value":"la"</code>) or a full component (<code>"value":{"text":"la","color":"red"}</code>).<br />
:;<code>show_item</code><br />
::The NBT of the item to display, in the JSON-NBT format (as would be used in <code>/give</code>). Note that this is a String and not a JSON object - it should either be set in a String directly (<code>"value":"{id:35,Damage:5,Count:2,tag:{display:{Name:Testing}}}"</code>) or as text of a component (<code>"value":{"text":"{id:35,Damage:5,Count:2,tag:{display:{Name:Testing}}}"}</code>). If the item is invalid, "Invalid Item!" will be drawn in red instead.<br />
:;<code>show_entity</code><br />
::A JSON-NBT String describing the entity. Contains 3 values: <code>id</code>, the entity's UUID (with dashes); <code>type</code> (optional), which contains the resource location for the entity's type (eg <code>minecraft:zombie</code>); and <code>name</code>, which contains the entity's custom name (if present). Note that this is a String and not a JSON object. It should be set in a String directly (<code>"value":"{id:7e4a61cc-83fa-4441-a299-bf69786e610a,type:minecraft:zombie,name:Zombie}"</code>) or as the content of a component. If the entity is invalid, "Invalid Entity!" will be displayed. Note that the client does ''not'' need to have the given entity loaded.<br />
:;<s><code>show_achievement</code></s><br />
::<strong>No longer supported</strong>. Since 1.12, this no longer exists; advancements instead simply use <code>show_text</code>. The ID of an achievement or statistic to display. Example: <code>"value":"achievement.openInventory"</code>.<br />
;<code>extra</code><br />
:An array of sibling components. If present, cannot be empty.<br />
<br />
Beyond that, there are additional properties. Attempt to parse as each of the following in the order they are described:<br />
<br />
==== String component ====<br />
<br />
A String component contains only text. If the JSON contains a <code>text</code> key, then the component is a String component. The only content of this component is its text, with no additional processing.<br />
<br />
==== Translation component ====<br />
<br />
{{Need Info|Is using this with an invalid key intended or deprecated? Also, what exactly happens on invalid formats?}}<br />
<br />
Translates text into the current language. If the JSON contains a <code>translate</code> key, then the component is a translation component.<br />
<br />
Translation supports <code>%s</code> and <code>%%</code> format tokens. <code>%%</code> is just an escaped percent symbol. <code>%s</code> marks text to replace using content from the optional <code>with</code> tag. <code>with</code> is an array of components.<br />
<br />
As a special case, if the translation key is <code>chat.type.text</code>, it will be changed to <code>chat.type.text.narrate</code> when passed to narrator (although it will remain as <code>chat.type.text</code> in chat).<br />
<br />
==== Keybind component ====<br />
<br />
Displays the client's current keybind for the specified key. If the component contains a <code>keybind</code> key, then it is a keybind component. The value is named after the keys in {{Minecraft Wiki|options.txt}} (for instance, for <code>key_key.forward</code> in options.txt, <code>key.forward</code> would be used in the component and <kbd>W</kbd> would be displayed). For keys that are not known, the value provided should be displayed instead (for instance <code>key.invalid</code> would remain as <code>key.invalid</code>).<br />
<br />
==== Score component ====<br />
<br />
Displays a score. If the JSON contains a <code>score</code> key, then the component is a score component.<br />
<br />
The <code>score</code> JSON object contains data about the objective.<br />
<br />
When being sent to the client, it must contain <code>name</code>, <code>objective</code>, and <code>value</code> keys. <code>name</code> is a player username or entity UUID (if it is a player, it is a username); <code>objective</code> is the name of the objective; <code>value</code> is the resolved value of that objective.<br />
<br />
When being sent to the server, <code>value</code> is not used. <code>name</code> can be an entity selector (that selects one entity), or alternatively <code>*</code> which matches the sending player.<br />
<br />
==== Selector component ====<br />
<br />
Displays the results of an entity selector. '''Should not be sent to clients'''; only intended for commands and client-to-server actions. If the component contains a <code>selector</code> key, then it is a selector component.<br />
<br />
The server resolves the list selector into a list of entities, each with an appropriate hover event, joined with commas between each entry, without an "and".<br />
<br />
=== Examples ===<br />
<br />
Here are some examples from the Notchain server for how chat formatting can be used.<br />
<br />
TODO - additional examples<br />
<br />
==== Standard chat message ====<br />
<br />
The normal chat message uses a translation component along with some styling.<br />
<br />
<syntaxhighlight lang="javascript"><br />
{"translate":"chat.type.text","with":[{"text":"Herobrine","clickEvent":{"action":"suggest_command","value":"/msg Herobrine "},"hoverEvent":{"action":"show_entity","value":"{id:f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2,name:Herobrine}"},"insertion":"Herobrine"},{"text":"I don't exist"}]}<br />
</syntaxhighlight><br />
<br />
The <code>chat.type.text</code> translation key becomes <code><nowiki><%s> %s</nowiki></code>, which is then filled in with the player's name and the actual message. Note that the player's name has a click event (which inserts text to message the player), a hover event (which shows the entity ID; also note that <code>type</code> is missing), and an insertion (for the player's name).<br />
<br />
=== Social Interactions (blocking) ===<br />
<br />
1.16 added a ''social interactions screen'' that lets players block chat from other players. Blocking takes place clientside by detecting whether a message is from a blocked player.<br />
<br />
If a client blocks player named ''blocked'', then chat messages containing <code><blocked></code> will not be shown. Messages containing non-whitespace characters before the ''<'' will also be hidden.<br />
This blocked player name is case-sensitive. Messages are still hidden if the player name is split across multiple chat components.<br />
<br />
Commands such as ''/tell'' and ''/me'' are not hidden.<br />
<br />
== Old system ==<br />
<br />
=== Control Sequences ===<br />
<br />
The client treats certain two-character sequences specially. The first character must be:<br />
<br />
*§ (U+00A7) for minecraft<br />
*& for minecraft classic<br />
<br />
The following character indicates a certain color or formatting to apply to the proceeding text.<br />
<br />
The Notchian classic client expects that an escape code in a chat message will be followed by at least one character, and will otherwise crash with a StringIndexOutOfBoundsException. The workaround for servers is to never end a message with a color control character. This is not an issue for the modern Notchian client.<br />
<br />
==== Colors ====<br />
<br />
These correspond very roughly to the colors available in ANSI terminals.<br />
<br />
e.g.: <code>This is white, but §4this is dark red</code><br />
<br />
[[File:Colors.png|thumb|Hex digit to color mapping]]<br />
<br />
{| class="wikitable" style="text-align:center;" border="1" cellpadding="5"<br />
|-<br />
! colspan="1" width="8px"| Sample<br />
! colspan="1" | Code<br />
! colspan="1" | Common Name<br />
! colspan="1" | Name<br />
! colspan="4" | Foreground Color<br />
! colspan="4" | Background Color<br />
|-<br />
| colspan="4" | <br />
|width="30px"|R<br />
|width="30px"|G<br />
|width="30px"|B<br />
| Hex<br />
|width="30px"|R<br />
|width="30px"|G<br />
|width="30px"|B<br />
| Hex<br />
|-<br />
{{/ColorSample|000000|000000}}<br />
| 0 || Black || <code>black</code> || 0 || 0 || 0 || #000000 || 0 || 0 || 0 || #000000<br />
|-<br />
{{/ColorSample|0000aa|00002a}}<br />
| 1 || Dark blue || <code>dark_blue</code> || 0 || 0 || 170 || #0000aa || 0 || 0 || 42 || #00002a<br />
|-<br />
{{/ColorSample|00aa00|002a00}}<br />
| 2 || Dark green || <code>dark_green</code> || 0 || 170 || 0 || #00aa00 || 0 || 42 || 0 || #002a00<br />
|-<br />
{{/ColorSample|00aaaa|002a2a}}<br />
| 3 || Dark cyan || <code>dark_aqua</code> || 0 || 170 || 170 || #00aaaa || 0 || 42 || 42 || #002a2a<br />
|-<br />
{{/ColorSample|aa0000|2a0000}}<br />
| 4 || Dark red || <code>dark_red</code> || 170 || 0 || 0 || #aa0000 || 42 || 0 || 0 || #2a0000<br />
|-<br />
{{/ColorSample|aa00aa|2a002a}}<br />
| 5 || Purple || <code>dark_purple</code> || 170 || 0 || 170 || #aa00aa || 42 || 0 || 42 || #2a002a<br />
|-<br />
{{/ColorSample|ffaa00|2a2a00}}<br />
| 6 || Gold || <code>gold</code> || 255 || 170 || 0 || #ffaa00 || 42 || 42 || 0 || #2a2a00<br />
|-<br />
{{/ColorSample|aaaaaa|2a2a2a}}<br />
| 7 || Gray || <code>gray</code> || 170 || 170 || 170 || #aaaaaa || 42 || 42 || 42 || #2a2a2a<br />
|-<br />
{{/ColorSample|555555|151515}}<br />
| 8 || Dark gray || <code>dark_gray</code> || 85 || 85 || 85 || #555555 || 21 || 21 || 21 || #151515<br />
|-<br />
{{/ColorSample|5555ff|15153f}}<br />
| 9 || Blue || <code>blue</code> || 85 || 85 || 255 || #5555ff || 21 || 21 || 63 || #15153f<br />
|-<br />
{{/ColorSample|55ff55|153f15}}<br />
| a || Bright green || <code>green</code> || 85 || 255 || 85 || #55ff55 || 21 || 63 || 21 || #153f15<br />
|-<br />
{{/ColorSample|55ffff|153f3f}}<br />
| b || Cyan || <code>aqua</code> || 85 || 255 || 255 || #55ffff || 21 || 63 || 63 || #153f3f<br />
|-<br />
{{/ColorSample|ff5555|3f1515}}<br />
| c || Red || <code>red</code> || 255 || 85 || 85 || #ff5555 || 63 || 21 || 21 || #3f1515<br />
|-<br />
{{/ColorSample|ff55ff|3f153f}}<br />
| d || Pink || <code>light_purple</code> || 255 || 85 || 255 || #ff55ff || 63 || 21 || 63 || #3f153f<br />
|-<br />
{{/ColorSample|ffff55|3f3f15}}<br />
| e || Yellow || <code>yellow</code> || 255 || 255 || 85 || #ffff55 || 63 || 63 || 21 || #3f3f15<br />
|-<br />
{{/ColorSample|ffffff|3f3f3f}}<br />
| f || White || <code>white</code> || 255 || 255 || 255 || #ffffff || 63 || 63 || 63 || #3f3f3f<br />
|}<br />
<br />
==== Styles ====<br />
<br />
Like the color codes above, style escape codes are created by combining § (U+00A7) with one of the following characters. Style codes can be combined (except for "r") to enable multiple effects at once. Using any color codes will reset the current style back to plain (unknown if this is a bug or intended behavior). The "r" plain style code will also reset the current chat color back to white (may also be a bug). The "k" random style code is used for the "§kFUNKY LOL" message in /title/splashes.txt inside minecraft.jar.<br />
<br />
{| class="wikitable" style="text-align:center;" border="1" cellpadding="5"<br />
|-<br />
! colspan="1" | Sample<br />
! colspan="1" | Code<br />
! colspan="1" | Style<br />
! colspan="1" | Name<br />
|-<br />
| [[File:random_chat.gif]] || k || Random || <code>obfuscated</code><br />
|-<br />
| [[File:bold_chat.png]] || l || Bold || <code>bold</code><br />
|-<br />
| [[File:strikethrough_chat.png]] || m || Strikethrough || <code>strikethrough</code><br />
|-<br />
| [[File:underlined_chat.png]] || n || Underlined || <code>underline</code><br />
|-<br />
| [[File:italic_chat.png]] || o || Italic || <code>italic</code><br />
|-<br />
| [[File:plain_chat.png]] || r || Plain White || <code>reset</code><br />
|}<br />
<br />
== Processing chat ==<br />
<br />
Actually handling chat between the client and server is slightly more complicated than simply forwarding chat messages to other players. There's a somewhat complicated interaction regarding the chat settings of each player and whether it is a command or not, which is used to handle the various options in chat settings (specifically, Chat: Shown/Commands Only/Hidden, and the equivalent for narrator).<br />
<br />
This is made more complicated by the two different enums, one which represents client settings and the other which represents chat positions.<br />
<br />
The client setting (as used in the [[Protocol#Client Settings|Client Settings]] packet) is what the player chose to have displayed, and affects what types of chat messages the server should send:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
! Meaning<br />
|-<br />
| 0<br />
| Full<br />
| The client is willing to accept all chat messages.<br />
|-<br />
| 1<br />
| System<br />
| The client is willing to accept messages from commands, but does not want general chat from other players.<br />
|-<br />
| 2<br />
| None<br />
| The client does not want any chat at all. (However, it is still fine with above-hotbar game notices)<br />
|}<br />
<br />
The message type (as used in the [[Protocol#Chat Message (clientbound)|Chat Message]] packet) indicates the type of chat message:<br />
<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
! Meaning<br />
|-<br />
| 0<br />
| Chat<br />
| A player-initiated chat message. Note that the Notchian server does not include message-related commands here (<code>/me</code> and <code>/tell</code>); those go in System.<br />
|-<br />
| 1<br />
| System<br />
| Feedback from running a command, such as "Your game mode has been updated to creative."<br />
|-<br />
| 2<br />
| Game info<br />
| Game state information that is displayed above the hot bar, such as "You may not rest now, the bed is too far away".<br />
|}<br />
<br />
Note that it is the server's responsibility to ''not'' send packets if the client has the given type disabled. However, it is the client's responsibility to not send incorrect chat packets.<br />
<br />
Here's a matrix comparing what packets the server should send to the client by settings:<br />
<br />
{| class="wikitable"<br />
|<br />
!colspan="4" | Message type<br />
|-<br />
!rowspan="4" | Client setting<br />
|<br />
! Chat<br />
! System<br />
! Game info<br />
|-<br />
! Full<br />
| {{yes|✔}}<br />
| {{yes|✔}}<br />
| {{yes|✔}}<br />
|-<br />
! System<br />
| {{no|✘}}<br />
| {{yes|✔}}<br />
| {{yes|✔}}<br />
|-<br />
! Hidden<br />
| {{no|✘}}<br />
| {{no|✘}}<br />
| {{yes|✔}}<br />
|}<br />
<br />
Here's a matrix comparing what the client may send based off of its chat setting:<br />
<br />
{| class="wikitable"<br />
|<br />
!colspan="4" | Inbound message<br />
|-<br />
!rowspan="4" | Client setting<br />
|<br />
! Chat message<br />
! Command starting with <code>/</code><br />
|-<br />
! Full<br />
| {{yes|✔}}<br />
| {{yes|✔}}<br />
|-<br />
! System<br />
| {{maybe|✘<ref group="note">This behavior varies. The Notchian server <em>previously</em> rejected chat messages, but now allows them to go through (sending them to all players, but they're invisible on the sender's side). Craftbukkit and derivatives continue to reject this. See [https://bugs.mojang.com/browse/MC-116824 MC-116824] for more information.</ref>}}<br />
| {{yes|✔}}<br />
|-<br />
! Hidden<br />
| {{no|✘}}<br />
| {{no|✘}}<br />
|}<br />
<br />
If the client attempts to send a chat message and the server rejects it, the Notchian server will send that client a red <code>chat.cannotSend</code> translation component (which becomes "Cannot send chat message"). Else, if it starts with a <code>/</code>, then the message is processed as a command. Otherwise, it will broadcast a translate component with <code>chat.type.text</code> (which becomes <code><nowiki><%s> %s</nowiki></code>), with the player's name (and the appropriate hover events) as the first format parameter and the message as the second parameter.<br />
<br />
== Font ==<br />
<br />
Minecraft has two fonts types that can be encountered normally: Ascii (<code>ascii.png</code>) and Unicode (<code>unicode_page_XX.png</code>). The ascii font will fall back upon unicode characters if they are not provided (see below). However, use of the Unicode font can be forced for all characters in the language menu.<br />
<br />
There is no glyph for the space character. However, the space character has a width of 4.<br />
<br />
Additionally, Minecraft has a [[Wikipedia:Standard Galactic Alphabet|Standard Galactic Alphabet]] font (<code>ascii_sga.png</code>). This cannot be used in chat, but works much the same as the normal Ascii font in terms of width. The SGA font only supports lowercase and uppercase letters (the rest of the glyphs are blank), and has the same indexing as the normal ascii font.<br />
<br />
The Minecraft client calculates the widths of the default font when the texture is loaded, whilst the sizes of the unicode type are provided in <code>glyph_sizes.bin</code>. Each byte in <code>glyph_sizes.bin</code> contains the start and end position of each character, the top nibble (0xF0) is the start position and the bottom nibble (0x0F) is the end position (relative to the character's position in the font sheet). Example: https://gist.github.com/TkTech/dff9bbe54c9a074612e1<br />
<br />
<div class="mw-collapsible mw-collapsed" style="width: 41em"><br />
The Ascii font supports these characters, with the given indexes in <code>ascii.png</code>:<br />
<br />
{|class="mw-collapsible-content wikitable"<br />
! Codepoint !! Char !! index !! x !! y !! width<br />
|-<br />
| <code>\u00c0</code> || <code>À</code> || 0 || 0 || 0 || 6<br />
|-<br />
| <code>\u00c1</code> || <code>Á</code> || 1 || 1 || 0 || 6<br />
|-<br />
| <code>\u00c2</code> || <code>Â</code> || 2 || 2 || 0 || 6<br />
|-<br />
| <code>\u00c8</code> || <code>È</code> || 3 || 3 || 0 || 6<br />
|-<br />
| <code>\u00ca</code> || <code>Ê</code> || 4 || 4 || 0 || 6<br />
|-<br />
| <code>\u00cb</code> || <code>Ë</code> || 5 || 5 || 0 || 6<br />
|-<br />
| <code>\u00cd</code> || <code>Í</code> || 6 || 6 || 0 || 4<br />
|-<br />
| <code>\u00d3</code> || <code>Ó</code> || 7 || 7 || 0 || 6<br />
|-<br />
| <code>\u00d4</code> || <code>Ô</code> || 8 || 8 || 0 || 6<br />
|-<br />
| <code>\u00d5</code> || <code>Õ</code> || 9 || 9 || 0 || 6<br />
|-<br />
| <code>\u00da</code> || <code>Ú</code> || 10 || 10 || 0 || 6<br />
|-<br />
| <code>\u00df</code> || <code>ß</code> || 11 || 11 || 0 || 6<br />
|-<br />
| <code>\u00e3</code> || <code>ã</code> || 12 || 12 || 0 || 6<br />
|-<br />
| <code>\u00f5</code> || <code>õ</code> || 13 || 13 || 0 || 6<br />
|-<br />
| <code>\u011f</code> || <code>ğ</code> || 14 || 14 || 0 || 6<br />
|-<br />
| <code>\u0130</code> || <code>İ</code> || 15 || 15 || 0 || 4<br />
|-<br />
| <code>\u0131</code> || <code>ı</code> || 16 || 0 || 1 || 4<br />
|-<br />
| <code>\u0152</code> || <code>Œ</code> || 17 || 1 || 1 || 6<br />
|-<br />
| <code>\u0153</code> || <code>œ</code> || 18 || 2 || 1 || 7<br />
|-<br />
| <code>\u015e</code> || <code>Ş</code> || 19 || 3 || 1 || 6<br />
|-<br />
| <code>\u015f</code> || <code>ş</code> || 20 || 4 || 1 || 6<br />
|-<br />
| <code>\u0174</code> || <code>Ŵ</code> || 21 || 5 || 1 || 6<br />
|-<br />
| <code>\u0175</code> || <code>ŵ</code> || 22 || 6 || 1 || 6<br />
|-<br />
| <code>\u017e</code> || <code>ž</code> || 23 || 7 || 1 || 6<br />
|-<br />
| <code>\u0207</code> || <code>ȇ</code> || 24 || 8 || 1 || 6<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 25 || 9 || 1 || -<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 26 || 10 || 1 || -<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 27 || 11 || 1 || -<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 28 || 12 || 1 || -<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 29 || 13 || 1 || -<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 30 || 14 || 1 || -<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 31 || 15 || 1 || -<br />
|-<br />
| <code>\u0020</code> || <code> </code> || 32 || 0 || 2 || 4<ref group="note" name="space" /><br />
|-<br />
| <code>\u0021</code> || <code>!</code> || 33 || 1 || 2 || 2<br />
|-<br />
| <code>\u0022</code> || <code>"</code> || 34 || 2 || 2 || 5<br />
|-<br />
| <code>\u0023</code> || <code>#</code> || 35 || 3 || 2 || 6<br />
|-<br />
| <code>\u0024</code> || <code>$</code> || 36 || 4 || 2 || 6<br />
|-<br />
| <code>\u0025</code> || <code>%</code> || 37 || 5 || 2 || 6<br />
|-<br />
| <code>\u0026</code> || <code>&</code> || 38 || 6 || 2 || 6<br />
|-<br />
| <code>\u0027</code> || <code>'</code> || 39 || 7 || 2 || 3<br />
|-<br />
| <code>\u0028</code> || <code>(</code> || 40 || 8 || 2 || 5<br />
|-<br />
| <code>\u0029</code> || <code>)</code> || 41 || 9 || 2 || 5<br />
|-<br />
| <code>\u002a</code> || <code>*</code> || 42 || 10 || 2 || 5<br />
|-<br />
| <code>\u002b</code> || <code>+</code> || 43 || 11 || 2 || 6<br />
|-<br />
| <code>\u002c</code> || <code>,</code> || 44 || 12 || 2 || 2<br />
|-<br />
| <code>\u002d</code> || <code>-</code> || 45 || 13 || 2 || 6<br />
|-<br />
| <code>\u002e</code> || <code>.</code> || 46 || 14 || 2 || 2<br />
|-<br />
| <code>\u002f</code> || <code>/</code> || 47 || 15 || 2 || 6<br />
|-<br />
| <code>\u0030</code> || <code>0</code> || 48 || 0 || 3 || 6<br />
|-<br />
| <code>\u0031</code> || <code>1</code> || 49 || 1 || 3 || 6<br />
|-<br />
| <code>\u0032</code> || <code>2</code> || 50 || 2 || 3 || 6<br />
|-<br />
| <code>\u0033</code> || <code>3</code> || 51 || 3 || 3 || 6<br />
|-<br />
| <code>\u0034</code> || <code>4</code> || 52 || 4 || 3 || 6<br />
|-<br />
| <code>\u0035</code> || <code>5</code> || 53 || 5 || 3 || 6<br />
|-<br />
| <code>\u0036</code> || <code>6</code> || 54 || 6 || 3 || 6<br />
|-<br />
| <code>\u0037</code> || <code>7</code> || 55 || 7 || 3 || 6<br />
|-<br />
| <code>\u0038</code> || <code>8</code> || 56 || 8 || 3 || 6<br />
|-<br />
| <code>\u0039</code> || <code>9</code> || 57 || 9 || 3 || 6<br />
|-<br />
| <code>\u003a</code> || <code>:</code> || 58 || 10 || 3 || 2<br />
|-<br />
| <code>\u003b</code> || <code>;</code> || 59 || 11 || 3 || 2<br />
|-<br />
| <code>\u003c</code> || <code><</code> || 60 || 12 || 3 || 5<br />
|-<br />
| <code>\u003d</code> || <code>=</code> || 61 || 13 || 3 || 6<br />
|-<br />
| <code>\u003e</code> || <code>></code> || 62 || 14 || 3 || 5<br />
|-<br />
| <code>\u003f</code> || <code>?</code> || 63 || 15 || 3 || 6<br />
|-<br />
| <code>\u0040</code> || <code>@</code> || 64 || 0 || 4 || 7<br />
|-<br />
| <code>\u0041</code> || <code>A</code> || 65 || 1 || 4 || 6<br />
|-<br />
| <code>\u0042</code> || <code>B</code> || 66 || 2 || 4 || 6<br />
|-<br />
| <code>\u0043</code> || <code>C</code> || 67 || 3 || 4 || 6<br />
|-<br />
| <code>\u0044</code> || <code>D</code> || 68 || 4 || 4 || 6<br />
|-<br />
| <code>\u0045</code> || <code>E</code> || 69 || 5 || 4 || 6<br />
|-<br />
| <code>\u0046</code> || <code>F</code> || 70 || 6 || 4 || 6<br />
|-<br />
| <code>\u0047</code> || <code>G</code> || 71 || 7 || 4 || 6<br />
|-<br />
| <code>\u0048</code> || <code>H</code> || 72 || 8 || 4 || 6<br />
|-<br />
| <code>\u0049</code> || <code>I</code> || 73 || 9 || 4 || 4<br />
|-<br />
| <code>\u004a</code> || <code>J</code> || 74 || 10 || 4 || 6<br />
|-<br />
| <code>\u004b</code> || <code>K</code> || 75 || 11 || 4 || 6<br />
|-<br />
| <code>\u004c</code> || <code>L</code> || 76 || 12 || 4 || 6<br />
|-<br />
| <code>\u004d</code> || <code>M</code> || 77 || 13 || 4 || 6<br />
|-<br />
| <code>\u004e</code> || <code>N</code> || 78 || 14 || 4 || 6<br />
|-<br />
| <code>\u004f</code> || <code>O</code> || 79 || 15 || 4 || 6<br />
|-<br />
| <code>\u0050</code> || <code>P</code> || 80 || 0 || 5 || 6<br />
|-<br />
| <code>\u0051</code> || <code>Q</code> || 81 || 1 || 5 || 6<br />
|-<br />
| <code>\u0052</code> || <code>R</code> || 82 || 2 || 5 || 6<br />
|-<br />
| <code>\u0053</code> || <code>S</code> || 83 || 3 || 5 || 6<br />
|-<br />
| <code>\u0054</code> || <code>T</code> || 84 || 4 || 5 || 6<br />
|-<br />
| <code>\u0055</code> || <code>U</code> || 85 || 5 || 5 || 6<br />
|-<br />
| <code>\u0056</code> || <code>V</code> || 86 || 6 || 5 || 6<br />
|-<br />
| <code>\u0057</code> || <code>W</code> || 87 || 7 || 5 || 6<br />
|-<br />
| <code>\u0058</code> || <code>X</code> || 88 || 8 || 5 || 6<br />
|-<br />
| <code>\u0059</code> || <code>Y</code> || 89 || 9 || 5 || 6<br />
|-<br />
| <code>\u005a</code> || <code>Z</code> || 90 || 10 || 5 || 6<br />
|-<br />
| <code>\u005b</code> || <code>[</code> || 91 || 11 || 5 || 4<br />
|-<br />
| <code>\u005c</code> || <code>\</code> || 92 || 12 || 5 || 6<br />
|-<br />
| <code>\u005d</code> || <code>]</code> || 93 || 13 || 5 || 4<br />
|-<br />
| <code>\u005e</code> || <code>^</code> || 94 || 14 || 5 || 6<br />
|-<br />
| <code>\u005f</code> || <code>_</code> || 95 || 15 || 5 || 6<br />
|-<br />
| <code>\u0060</code> || <code>`</code> || 96 || 0 || 6 || 3<br />
|-<br />
| <code>\u0061</code> || <code>a</code> || 97 || 1 || 6 || 6<br />
|-<br />
| <code>\u0062</code> || <code>b</code> || 98 || 2 || 6 || 6<br />
|-<br />
| <code>\u0063</code> || <code>c</code> || 99 || 3 || 6 || 6<br />
|-<br />
| <code>\u0064</code> || <code>d</code> || 100 || 4 || 6 || 6<br />
|-<br />
| <code>\u0065</code> || <code>e</code> || 101 || 5 || 6 || 6<br />
|-<br />
| <code>\u0066</code> || <code>f</code> || 102 || 6 || 6 || 5<br />
|-<br />
| <code>\u0067</code> || <code>g</code> || 103 || 7 || 6 || 6<br />
|-<br />
| <code>\u0068</code> || <code>h</code> || 104 || 8 || 6 || 6<br />
|-<br />
| <code>\u0069</code> || <code>i</code> || 105 || 9 || 6 || 2<br />
|-<br />
| <code>\u006a</code> || <code>j</code> || 106 || 10 || 6 || 6<br />
|-<br />
| <code>\u006b</code> || <code>k</code> || 107 || 11 || 6 || 5<br />
|-<br />
| <code>\u006c</code> || <code>l</code> || 108 || 12 || 6 || 3<br />
|-<br />
| <code>\u006d</code> || <code>m</code> || 109 || 13 || 6 || 6<br />
|-<br />
| <code>\u006e</code> || <code>n</code> || 110 || 14 || 6 || 6<br />
|-<br />
| <code>\u006f</code> || <code>o</code> || 111 || 15 || 6 || 6<br />
|-<br />
| <code>\u0070</code> || <code>p</code> || 112 || 0 || 7 || 6<br />
|-<br />
| <code>\u0071</code> || <code>q</code> || 113 || 1 || 7 || 6<br />
|-<br />
| <code>\u0072</code> || <code>r</code> || 114 || 2 || 7 || 6<br />
|-<br />
| <code>\u0073</code> || <code>s</code> || 115 || 3 || 7 || 6<br />
|-<br />
| <code>\u0074</code> || <code>t</code> || 116 || 4 || 7 || 4<br />
|-<br />
| <code>\u0075</code> || <code>u</code> || 117 || 5 || 7 || 6<br />
|-<br />
| <code>\u0076</code> || <code>v</code> || 118 || 6 || 7 || 6<br />
|-<br />
| <code>\u0077</code> || <code>w</code> || 119 || 7 || 7 || 6<br />
|-<br />
| <code>\u0078</code> || <code>x</code> || 120 || 8 || 7 || 6<br />
|-<br />
| <code>\u0079</code> || <code>y</code> || 121 || 9 || 7 || 6<br />
|-<br />
| <code>\u007a</code> || <code>z</code> || 122 || 10 || 7 || 6<br />
|-<br />
| <code>\u007b</code> || <code>{</code> || 123 || 11 || 7 || 5<br />
|-<br />
| <code>\u007c</code> || <code><nowiki>|</nowiki></code> || 124 || 12 || 7 || 2<br />
|-<br />
| <code>\u007d</code> || <code>}</code> || 125 || 13 || 7 || 5<br />
|-<br />
| <code>\u007e</code> || <code>~</code> || 126 || 14 || 7 || 7<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 127 || 15 || 7 || -<br />
|-<br />
| <code>\u00c7</code> || <code>Ç</code> || 128 || 0 || 8 || 6<br />
|-<br />
| <code>\u00fc</code> || <code>ü</code> || 129 || 1 || 8 || 6<br />
|-<br />
| <code>\u00e9</code> || <code>é</code> || 130 || 2 || 8 || 6<br />
|-<br />
| <code>\u00e2</code> || <code>â</code> || 131 || 3 || 8 || 6<br />
|-<br />
| <code>\u00e4</code> || <code>ä</code> || 132 || 4 || 8 || 6<br />
|-<br />
| <code>\u00e0</code> || <code>à</code> || 133 || 5 || 8 || 6<br />
|-<br />
| <code>\u00e5</code> || <code>å</code> || 134 || 6 || 8 || 6<br />
|-<br />
| <code>\u00e7</code> || <code>ç</code> || 135 || 7 || 8 || 6<br />
|-<br />
| <code>\u00ea</code> || <code>ê</code> || 136 || 8 || 8 || 6<br />
|-<br />
| <code>\u00eb</code> || <code>ë</code> || 137 || 9 || 8 || 6<br />
|-<br />
| <code>\u00e8</code> || <code>è</code> || 138 || 10 || 8 || 6<br />
|-<br />
| <code>\u00ef</code> || <code>ï</code> || 139 || 11 || 8 || 4<br />
|-<br />
| <code>\u00ee</code> || <code>î</code> || 140 || 12 || 8 || 6<br />
|-<br />
| <code>\u00ec</code> || <code>ì</code> || 141 || 13 || 8 || 3<br />
|-<br />
| <code>\u00c4</code> || <code>Ä</code> || 142 || 14 || 8 || 6<br />
|-<br />
| <code>\u00c5</code> || <code>Å</code> || 143 || 15 || 8 || 6<br />
|-<br />
| <code>\u00c9</code> || <code>É</code> || 144 || 0 || 9 || 6<br />
|-<br />
| <code>\u00e6</code> || <code>æ</code> || 145 || 1 || 9 || 6<br />
|-<br />
| <code>\u00c6</code> || <code>Æ</code> || 146 || 2 || 9 || 6<br />
|-<br />
| <code>\u00f4</code> || <code>ô</code> || 147 || 3 || 9 || 6<br />
|-<br />
| <code>\u00f6</code> || <code>ö</code> || 148 || 4 || 9 || 6<br />
|-<br />
| <code>\u00f2</code> || <code>ò</code> || 149 || 5 || 9 || 6<br />
|-<br />
| <code>\u00fb</code> || <code>û</code> || 150 || 6 || 9 || 6<br />
|-<br />
| <code>\u00f9</code> || <code>ù</code> || 151 || 7 || 9 || 6<br />
|-<br />
| <code>\u00ff</code> || <code>ÿ</code> || 152 || 8 || 9 || 6<br />
|-<br />
| <code>\u00d6</code> || <code>Ö</code> || 153 || 9 || 9 || 6<br />
|-<br />
| <code>\u00dc</code> || <code>Ü</code> || 154 || 10 || 9 || 6<br />
|-<br />
| <code>\u00f8</code> || <code>ø</code> || 155 || 11 || 9 || 6<br />
|-<br />
| <code>\u00a3</code> || <code>£</code> || 156 || 12 || 9 || 6<br />
|-<br />
| <code>\u00d8</code> || <code>Ø</code> || 157 || 13 || 9 || 6<br />
|-<br />
| <code>\u00d7</code> || <code>×</code> || 158 || 14 || 9 || 4<br />
|-<br />
| <code>\u0192</code> || <code>ƒ</code> || 159 || 15 || 9 || 6<br />
|-<br />
| <code>\u00e1</code> || <code>á</code> || 160 || 0 || 10 || 6<br />
|-<br />
| <code>\u00ed</code> || <code>í</code> || 161 || 1 || 10 || 3<br />
|-<br />
| <code>\u00f3</code> || <code>ó</code> || 162 || 2 || 10 || 6<br />
|-<br />
| <code>\u00fa</code> || <code>ú</code> || 163 || 3 || 10 || 6<br />
|-<br />
| <code>\u00f1</code> || <code>ñ</code> || 164 || 4 || 10 || 6<br />
|-<br />
| <code>\u00d1</code> || <code>Ñ</code> || 165 || 5 || 10 || 6<br />
|-<br />
| <code>\u00aa</code> || <code>ª</code> || 166 || 6 || 10 || 6<br />
|-<br />
| <code>\u00ba</code> || <code>º</code> || 167 || 7 || 10 || 6<br />
|-<br />
| <code>\u00bf</code> || <code>¿</code> || 168 || 8 || 10 || 6<br />
|-<br />
| <code>\u00ae</code> || <code>®</code> || 169 || 9 || 10 || 7<br />
|-<br />
| <code>\u00ac</code> || <code>¬</code> || 170 || 10 || 10 || 6<br />
|-<br />
| <code>\u00bd</code> || <code>½</code> || 171 || 11 || 10 || 6<br />
|-<br />
| <code>\u00bc</code> || <code>¼</code> || 172 || 12 || 10 || 6<br />
|-<br />
| <code>\u00a1</code> || <code>¡</code> || 173 || 13 || 10 || 2<br />
|-<br />
| <code>\u00ab</code> || <code>«</code> || 174 || 14 || 10 || 6<br />
|-<br />
| <code>\u00bb</code> || <code>»</code> || 175 || 15 || 10 || 6<br />
|-<br />
| <code>\u2591</code> || <code>░</code> || 176 || 0 || 11 || 8<br />
|-<br />
| <code>\u2592</code> || <code>▒</code> || 177 || 1 || 11 || 9<br />
|-<br />
| <code>\u2593</code> || <code>▓</code> || 178 || 2 || 11 || 9<br />
|-<br />
| <code>\u2502</code> || <code>│</code> || 179 || 3 || 11 || 6<br />
|-<br />
| <code>\u2524</code> || <code>┤</code> || 180 || 4 || 11 || 6<br />
|-<br />
| <code>\u2561</code> || <code>╡</code> || 181 || 5 || 11 || 6<br />
|-<br />
| <code>\u2562</code> || <code>╢</code> || 182 || 6 || 11 || 8<br />
|-<br />
| <code>\u2556</code> || <code>╖</code> || 183 || 7 || 11 || 8<br />
|-<br />
| <code>\u2555</code> || <code>╕</code> || 184 || 8 || 11 || 6<br />
|-<br />
| <code>\u2563</code> || <code>╣</code> || 185 || 9 || 11 || 8<br />
|-<br />
| <code>\u2551</code> || <code>║</code> || 186 || 10 || 11 || 8<br />
|-<br />
| <code>\u2557</code> || <code>╗</code> || 187 || 11 || 11 || 8<br />
|-<br />
| <code>\u255d</code> || <code>╝</code> || 188 || 12 || 11 || 8<br />
|-<br />
| <code>\u255c</code> || <code>╜</code> || 189 || 13 || 11 || 8<br />
|-<br />
| <code>\u255b</code> || <code>╛</code> || 190 || 14 || 11 || 6<br />
|-<br />
| <code>\u2510</code> || <code>┐</code> || 191 || 15 || 11 || 6<br />
|-<br />
| <code>\u2514</code> || <code>└</code> || 192 || 0 || 12 || 9<br />
|-<br />
| <code>\u2534</code> || <code>┴</code> || 193 || 1 || 12 || 9<br />
|-<br />
| <code>\u252c</code> || <code>┬</code> || 194 || 2 || 12 || 9<br />
|-<br />
| <code>\u251c</code> || <code>├</code> || 195 || 3 || 12 || 9<br />
|-<br />
| <code>\u2500</code> || <code>─</code> || 196 || 4 || 12 || 9<br />
|-<br />
| <code>\u253c</code> || <code>┼</code> || 197 || 5 || 12 || 9<br />
|-<br />
| <code>\u255e</code> || <code>╞</code> || 198 || 6 || 12 || 9<br />
|-<br />
| <code>\u255f</code> || <code>╟</code> || 199 || 7 || 12 || 9<br />
|-<br />
| <code>\u255a</code> || <code>╚</code> || 200 || 8 || 12 || 9<br />
|-<br />
| <code>\u2554</code> || <code>╔</code> || 201 || 9 || 12 || 9<br />
|-<br />
| <code>\u2569</code> || <code>╩</code> || 202 || 10 || 12 || 9<br />
|-<br />
| <code>\u2566</code> || <code>╦</code> || 203 || 11 || 12 || 9<br />
|-<br />
| <code>\u2560</code> || <code>╠</code> || 204 || 12 || 12 || 9<br />
|-<br />
| <code>\u2550</code> || <code>═</code> || 205 || 13 || 12 || 9<br />
|-<br />
| <code>\u256c</code> || <code>╬</code> || 206 || 14 || 12 || 9<br />
|-<br />
| <code>\u2567</code> || <code>╧</code> || 207 || 15 || 12 || 9<br />
|-<br />
| <code>\u2568</code> || <code>╨</code> || 208 || 0 || 13 || 9<br />
|-<br />
| <code>\u2564</code> || <code>╤</code> || 209 || 1 || 13 || 9<br />
|-<br />
| <code>\u2565</code> || <code>╥</code> || 210 || 2 || 13 || 9<br />
|-<br />
| <code>\u2559</code> || <code>╙</code> || 211 || 3 || 13 || 9<br />
|-<br />
| <code>\u2558</code> || <code>╘</code> || 212 || 4 || 13 || 9<br />
|-<br />
| <code>\u2552</code> || <code>╒</code> || 213 || 5 || 13 || 9<br />
|-<br />
| <code>\u2553</code> || <code>╓</code> || 214 || 6 || 13 || 9<br />
|-<br />
| <code>\u256b</code> || <code>╫</code> || 215 || 7 || 13 || 9<br />
|-<br />
| <code>\u256a</code> || <code>╪</code> || 216 || 8 || 13 || 9<br />
|-<br />
| <code>\u2518</code> || <code>┘</code> || 217 || 9 || 13 || 6<br />
|-<br />
| <code>\u250c</code> || <code>┌</code> || 218 || 10 || 13 || 9<br />
|-<br />
| <code>\u2588</code> || <code>█</code> || 219 || 11 || 13 || 9<br />
|-<br />
| <code>\u2584</code> || <code>▄</code> || 220 || 12 || 13 || 9<br />
|-<br />
| <code>\u258c</code> || <code>▌</code> || 221 || 13 || 13 || 5<br />
|-<br />
| <code>\u2590</code> || <code>▐</code> || 222 || 14 || 13 || 9<br />
|-<br />
| <code>\u2580</code> || <code>▀</code> || 223 || 15 || 13 || 9<br />
|-<br />
| <code>\u03b1</code> || <code>α</code> || 224 || 0 || 14 || 8<br />
|-<br />
| <code>\u03b2</code> || <code>β</code> || 225 || 1 || 14 || 7<br />
|-<br />
| <code>\u0393</code> || <code>Γ</code> || 226 || 2 || 14 || 7<br />
|-<br />
| <code>\u03c0</code> || <code>π</code> || 227 || 3 || 14 || 8<br />
|-<br />
| <code>\u03a3</code> || <code>Σ</code> || 228 || 4 || 14 || 7<br />
|-<br />
| <code>\u03c3</code> || <code>σ</code> || 229 || 5 || 14 || 8<br />
|-<br />
| <code>\u03bc</code> || <code>μ</code> || 230 || 6 || 14 || 8<br />
|-<br />
| <code>\u03c4</code> || <code>τ</code> || 231 || 7 || 14 || 8<br />
|-<br />
| <code>\u03a6</code> || <code>Φ</code> || 232 || 8 || 14 || 7<br />
|-<br />
| <code>\u0398</code> || <code>Θ</code> || 233 || 9 || 14 || 8<br />
|-<br />
| <code>\u03a9</code> || <code>Ω</code> || 234 || 10 || 14 || 8<br />
|-<br />
| <code>\u03b4</code> || <code>δ</code> || 235 || 11 || 14 || 7<br />
|-<br />
| <code>\u221e</code> || <code>∞</code> || 236 || 12 || 14 || 9<br />
|-<br />
| <code>\u2205</code> || <code>∅</code> || 237 || 13 || 14 || 9<br />
|-<br />
| <code>\u2208</code> || <code>∈</code> || 238 || 14 || 14 || 6<br />
|-<br />
| <code>\u2229</code> || <code>∩</code> || 239 || 15 || 14 || 7<br />
|-<br />
| <code>\u2261</code> || <code>≡</code> || 240 || 0 || 15 || 7<br />
|-<br />
| <code>\u00b1</code> || <code>±</code> || 241 || 1 || 15 || 7<br />
|-<br />
| <code>\u2265</code> || <code>≥</code> || 242 || 2 || 15 || 7<br />
|-<br />
| <code>\u2264</code> || <code>≤</code> || 243 || 3 || 15 || 7<br />
|-<br />
| <code>\u2320</code> || <code>⌠</code> || 244 || 4 || 15 || 9<br />
|-<br />
| <code>\u2321</code> || <code>⌡</code> || 245 || 5 || 15 || 6<br />
|-<br />
| <code>\u00f7</code> || <code>÷</code> || 246 || 6 || 15 || 7<br />
|-<br />
| <code>\u2248</code> || <code>≈</code> || 247 || 7 || 15 || 8<br />
|-<br />
| <code>\u00b0</code> || <code>°</code> || 248 || 8 || 15 || 7<br />
|-<br />
| <code>\u2219</code> || <code>∙</code> || 249 || 9 || 15 || 6<br />
|-<br />
| <code>\u00b7</code> || <code>·</code> || 250 || 10 || 15 || 6<br />
|-<br />
| <code>\u221a</code> || <code>√</code> || 251 || 11 || 15 || 9<br />
|-<br />
| <code>\u207f</code> || <code>ⁿ</code> || 252 || 12 || 15 || 7<br />
|-<br />
| <code>\u00b2</code> || <code>²</code> || 253 || 13 || 15 || 6<br />
|-<br />
| <code>\u25a0</code> || <code>■</code> || 254 || 14 || 15 || 7<br />
|-<br />
| <code>\u0000</code> || <ref group="note" name="zero" /> || 255 || 15 || 15 || -<br />
|}<br />
</div><br />
<br />
{{Need Info|Clearer documentation on how rendering works (for instance, shadows)}}<br />
<br />
== Notes ==<br />
<br />
<references group="note"><br />
<ref name="zero">This code point isn't supported, and may be replaced with another character in a future version. <code>\u0000</code> should be directly skipped instead of being rendered with this code point.</ref><br />
<ref name="space">The space character is mapped to an index within <code>ascii.png</code>, but the width is hardcoded to 4 and the character at that position is not rendered.</ref><br />
</references><br />
<br />
[[Category:Protocol Details]]<br />
[[Category:Minecraft Modern]]</div>Lunarhttps://wiki.vg/index.php?title=Server_List_Ping&diff=17114Server List Ping2021-11-16T21:33:55Z<p>Lunar: Added the Beta 1.3 through 1.8 server response packet. Specified MOTD's max length. Specified that the MOTD, online players and max players should be in the same UTF-16BE encoded string.</p>
<hr />
<div>'''Server List Ping''' ('''SLP''') is an interface provided by Minecraft servers which supports querying the MOTD, player count, max players and server version via the usual port. SLP is part of the [[Protocol]], so unlike [[Query]], the interface is always enabled. The Notchian client uses this interface to display the multiplayer server list, hence the name. The SLP process changed in {{Minecraft Wiki|1.7}} in a non-backwards compatible way, but current servers still support both the [[#Current|new]] and [[#1.6|old]] process.<br />
<br />
== Current ==<br />
<br />
This uses the regular client-server [[protocol]]. For the general packet format, see that article.<br />
<br />
=== Handshake ===<br />
<br />
First, the client sends a [[Protocol#Handshake|Handshake]] packet with its state set to 1.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
|rowspan="4"| 0x00<br />
| Protocol Version<br />
| VarInt<br />
| See [[protocol version numbers]]. The version that the client plans on using to connect to the server (which is not important for the ping). If the client is pinging to determine what version to use, by convention <code>-1</code> should be set.<br />
|-<br />
| Server Address<br />
| String<br />
| Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect. The Notchian server does not use this information. Note that SRV records are a complete redirect, e.g. if _minecraft._tcp.example.com points to mc.example.org, users connecting to example.com will provide mc.example.org as server address in addition to connecting to it.<br />
|-<br />
| Server Port<br />
| Unsigned Short<br />
| Default is 25565. The Notchian server does not use this information.<br />
|-<br />
| Next state<br />
| VarInt<br />
| Should be 1 for [[Protocol#Status|status]], but could also be 2 for [[Protocol#Login|login]].<br />
|}<br />
<br />
=== Request ===<br />
<br />
The client follows up with a [[Protocol#Request|Request]] packet. This packet has no fields.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
|colspan="3"| ''no fields''<br />
|}<br />
<br />
=== Response ===<br />
<br />
The server should respond with a [[Protocol#Response|Response]] packet. Note that Notchian servers will for unknown reasons wait to receive the following [[Protocol#Ping|Ping]] packet for 30 seconds before timing out and sending Response.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x00<br />
| JSON Response<br />
| String<br />
| See below; as with all strings this is prefixed by its length as a VarInt<br />
|}<br />
<br />
The JSON Response field is a [[wikipedia:JSON|JSON]] object which has the following format:<br />
<br />
<syntaxhighlight lang="javascript"><br />
{<br />
"version": {<br />
"name": "1.8.7",<br />
"protocol": 47<br />
},<br />
"players": {<br />
"max": 100,<br />
"online": 5,<br />
"sample": [<br />
{<br />
"name": "thinkofdeath",<br />
"id": "4566e69f-c907-48ee-8d71-d7ba5aa00d20"<br />
}<br />
]<br />
},<br />
"description": {<br />
"text": "Hello world"<br />
},<br />
"favicon": "data:image/png;base64,<data>"<br />
}<br />
</syntaxhighlight><br />
<br />
The ''description'' field is a [[Chat]] object. Note that the Notchian server has no way of providing actual chat component data; instead section sign-based codes are embedded within the text of the object.<br />
<br />
The ''favicon'' field is optional. The ''sample'' field may be missing if the server has no online players.<br />
<br />
The ''favicon'' should be a [[wikipedia:Portable Network Graphics|PNG]] image that is [[wikipedia:Base64|Base64]] encoded (without newlines: <code>\n</code>, new lines no longer work since 1.13) and prepended with <code>data:image/png;base64,</code>.<br />
<br />
After receiving the Response packet, the client may send the next packet to help calculate the server's latency, or if it is only interested in the above information it can disconnect here.<br />
<br />
If the client does not receive a properly formatted response, then it will instead attempt a [[Server_List_Ping#1.6|legacy ping]].<br />
<br />
=== Ping ===<br />
<br />
If the process is continued, the client will now send a [[Protocol#Ping|Ping]] packet containing some payload which is not important.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x01<br />
| Payload<br />
| Long<br />
| May be any number. Notchian clients use a system-dependent time value which is counted in milliseconds.<br />
|}<br />
<br />
=== Pong ===<br />
<br />
The server will respond with the [[Protocol#Pong|Pong]] packet and then close the connection.<br />
<br />
{| class="wikitable"<br />
! Packet ID<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| 0x01<br />
| Payload<br />
| Long<br />
| Should be the same as sent by the client<br />
|}<br />
<br />
=== Ping via LAN (Open to LAN in Singleplayer) ===<br />
<br />
In Singleplayer there is a function called "Open to LAN". Minecraft (in the serverlist) binds a UDP port and listens for connections to <code>224.0.2.60:4445</code> (Yes, that is the actual IP, no matter in what network you are or what your local IP Address is). If you click on "Open to LAN" Minecraft sends a packet every 1.5 seconds to the address: <code>[MOTD]{motd}[/MOTD][AD]{port}[/AD]</code>. Minecraft seems to check for the following Strings: <code>[MOTD]</code>, <code>[/MOTD]</code>, <code>[AD]</code>, <code>[/AD]</code>. Anything you write outside of each of the tags will be ignored. Color codes seems to be unsupported (ToDo: Check again. Did not work here). Between <code>[AD]</code> and <code>[/AD]</code> is the servers port. If it is not numeric, 25565 will be used. If it is out of range, an error is being displayed when trying to connect. The IP Address is the same as the senders one. The string is encoded with UTF-8.<br />
<br />
To implement it server side, just send a packet with the text (payload) to <code>224.0.2.60:4445</code>. If you are client side, bind a UDP socket and listen for connections. You can use a <code>MulticastSocket</code> for that.<br />
<br />
=== Examples ===<br />
<br />
* [https://gist.github.com/csh/2480d14fbbb33b4bbae3 C#]<br />
* [https://gist.github.com/zh32/7190955 Java]<br />
* [https://gist.github.com/1209061 Python]<br />
* [https://gist.github.com/ewized/97814f57ac85af7128bf Python3]<br />
* [https://github.com/xPaw/PHP-Minecraft-Query PHP]<br />
* [https://gitlab.bixilon.de/bixilon/minosoft/-/blob/43d8988ef94b6487e4da0218d87cf66ccf14a1ea/src/main/java/de/bixilon/minosoft/protocol/protocol/LANServerListener.java LAN Server Listener (Java)]<br />
* [https://gitlab.bixilon.de/bixilon/minosoft/-/blob/master/src/main/java/de/bixilon/minosoft/protocol/protocol/LANServerListener.kt LAN Server Listener (Kotlin)]<br />
<br />
== 1.6 ==<br />
<br />
This uses a protocol which is compatible with the client-server protocol as it was before the Netty rewrite. Modern servers recognize this protocol by the starting byte of <code>fe</code> instead of the usual <code>00</code>.<br />
<br />
=== Client to server ===<br />
<br />
The client initiates a TCP connection to the server on the standard port. Instead of doing auth and logging in (as detailed in [[Protocol]] and [[Protocol Encryption]]), it sends the following data, expressed in hexadecimal:<br />
<br />
# <code>FE</code> — packet identifier for a server list ping<br />
# <code>01</code> — server list ping's payload (always 1)<br />
# <code>FA</code> — packet identifier for a plugin message<br />
# <code>00 0B</code> — length of following string, in characters, as a short (always 11)<br />
# <code>00 4D 00 43 00 7C 00 50 00 69 00 6E 00 67 00 48 00 6F 00 73 00 74</code> — the string <code>MC|PingHost</code> encoded as a [http://en.wikipedia.org/wiki/UTF-16 UTF-16BE] string<br />
# <code>XX XX</code> — length of the rest of the data, as a short. Compute as <code>7 + len(hostname)</code>, where <code>len(hostname)</code> is the number of bytes in the UTF-16BE encoded hostname.<br />
# <code>XX</code> — [[Protocol version numbers#Versions before the Netty rewrite|protocol version]], e.g. <code>4a</code> for the last version (74)<br />
# <code>XX XX</code> — length of following string, in characters, as a short<br />
# <code>...</code> — hostname the client is connecting to, encoded as a [http://en.wikipedia.org/wiki/UTF-16 UTF-16BE] string<br />
# <code>XX XX XX XX</code> — port the client is connecting to, as an int.<br />
<br />
All data types are big-endian.<br />
<br />
Example packet dump:<br />
<br />
0000000: fe01 fa00 0b00 4d00 4300 7c00 5000 6900 ......M.C.|.P.i.<br />
0000010: 6e00 6700 4800 6f00 7300 7400 1949 0009 n.g.H.o.s.t..I..<br />
0000020: 006c 006f 0063 0061 006c 0068 006f 0073 .l.o.c.a.l.h.o.s<br />
0000030: 0074 0000 63dd .t..c.<br />
<br />
'''Note: ''' All notchian servers only cares about the first 3 bytes. After reading <code>FE 01 FA</code>, the response will be sent to the client. For backward compatibility, you could only send these 3 bytes and all legacy servers(<=1.6) will respond correspondingly.<br />
<br />
=== Server to client ===<br />
<br />
The server responds with a 0xFF kick packet. The packet begins with a single byte identifier <code>ff</code>, then a two-byte big endian short giving the length of the following string in characters. You can actually ignore the length because the server closes the connection after the response is sent.<br />
<br />
After the first 3 bytes, the packet is a UTF-16BE string. It begins with two characters: <code>§1</code>, followed by a null character. On the wire these look like <code>00 a7 00 31 00 00</code>.<br />
<br />
The remainder is null character (that is <code>00 00</code>) delimited fields:<br />
<br />
# Protocol version (e.g. <code>74</code>)<br />
# Minecraft server version (e.g. <code>1.8.7</code>)<br />
# Message of the day (e.g. <code>A Minecraft Server</code>)<br />
# Current player count<br />
# Max players<br />
<br />
The entire packet looks something like this:<br />
<br />
<---> first character<br />
0000000: ff00 2300 a700 3100 0000 3400 3700 0000 ....§.1...4.7...<br />
0000010: 3100 2e00 3400 2e00 3200 0000 4100 2000 1...4...2...A. .<br />
0000020: 4d00 6900 6e00 6500 6300 7200 6100 6600 M.i.n.e.c.r.a.f.<br />
0000030: 7400 2000 5300 6500 7200 7600 6500 7200 t. .S.e.r.v.e.r.<br />
0000040: 0000 3000 0000 3200 30 ..0...2.0<br />
<br />
'''Note: ''' When using this protocol with servers on version 1.7.x and above, the protocol version (first field) in the response will always be <code>127</code> which is not a real protocol number, so older clients will always consider this server incompatible.<br />
<br />
=== Examples ===<br />
<br />
* [https://gist.github.com/6281388 Ruby]<br />
* [https://github.com/winny-/mcstat PHP]<br />
<br />
== 1.4 to 1.5 ==<br />
<br />
Prior to the Minecraft 1.6, the client to server operation is much simpler, and only sends <code>FE 01</code>, with none of the following data.<br />
<br />
=== Examples ===<br />
<br />
* [https://gist.github.com/5795159 PHP]<br />
* [https://gist.github.com/4574114 Java]<br />
* [https://gist.github.com/6223787 C#]<br />
<br />
== Beta 1.8 to 1.3 ==<br />
<br />
Prior to Minecraft 1.4, the client only sends <code>FE</code>. <br />
<br />
The server should respond with a kick packet:<br />
{| class="wikitable"<br />
! Field Name<br />
! Field Type<br />
! Notes<br />
|-<br />
| Packet Id<br />
| Byte<br />
| The kick packet id: <code>0xFF</code><br />
|-<br />
| Packet Length<br />
| Short<br />
| The remaining packet length. For unknown reasons (likely due to encoding), this needs to be divided by 2.<br />
|-<br />
| MOTD<br />
|rowspan="3"| A [http://en.wikipedia.org/wiki/UTF-16 UTF-16BE] encoded string<br />
| From here on out, all fields should be seperated with <code>§</code>, in the same string. The max length this string can be is 64 bytes.<br />
|-<br />
| Online Players<br />
| The count of players currently on the server.<br />
|-<br />
| Max Players<br />
| The maximum amount of players that the server is willing to accept.<br />
|}<br />
<br />
The entire packet looks something like this on wire:<br />
<br />
<---> first character<br />
0000000: ff00 1700 4100 2000 4d00 6900 6e00 6500 ....A. .M.i.n.e.<br />
0000010: 6300 7200 6100 6600 7400 2000 5300 6500 c.r.a.f.t. .S.e.<br />
0000020: 7200 7600 6500 7200 a700 3000 a700 3100 r.v.e.r.§.0.§.1.<br />
0000030: 30 0<br />
<br />
[[Category:Minecraft Modern]]</div>Lunar