Jump to content

Wikipedia:MediaWiki order of page names

From Wikipedia, the free encyclopedia
Unicode

The MediaWiki software uses Unicode alphabetical order when ordering names of articles (and other pages), such as seen when presenting alphabetized lists of articles on Category pages. Unicode alphabetical order is different from standard English alphabetization. The part of Unicode alphabetical order which concerns us is:

!"#$%&'()*+,-./0123456789:;<=>?@
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
abcdefghijklmnopqrstuvwxyz{|}~
¡¢£¤¥¦§¨©ª«­®¯°±²³´µ•¸¹º»¼½¾¿
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋ
ŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ
ǺǻǼǽǾǿ΄΅Ά·ΈΉΊΌΎΏΐ
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰ
αβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ

Note in particular that capital "Z" comes before lowercase "a", and "z" before "é". A blank space within a page name is treated as an underscore, and therefore comes after the capitals, and before the lower case letters.[A] Sometimes a special character looks to the reader like a standard English-language Latin character, but has a special code anyway.

Since capital letters come before lower case letters, an article named "Happiness McGee" will come before "Happiness algorithm". They will both come before "Ātman (Hinduism)" which in turn will come before "δ-opioid receptor", unless ordering is altered by {{DEFAULTSORT}} within the article (which is commonly done for articles which start with diacritic-added Latin characters (e.g. "Ā") but not for non-Latin characters (e.g. "δ")).

Controlling with DEFAULTSORT

Editors can control the alphabetical order of articles as they appear on Category pages (only) with the {{DEFAULTSORT}} template. Thus, for an article named "¡Basta Ya!", writing {{DEFAULTSORT:Basta Ya}} inside the article will cause it to be alphabetically ordered with "B" articles on Category pages. (But the actual native name ("¡Basta Ya!") will appear to the reader on the Category page, even though grouped in with the "B"s, as DEFAULTSORT cannot control that). Similarly, {{DEFAULTSORT:Atman (Hinduism)}} will cause the article "Ātman (Hinduism)" to be ordered under "A", and so forth.

({{DEFAULTSORT}} does not affect alphabetical ordering except on Category pages. Thus, on Special:Allpages, which displays all articles but is not a Category page, "¡Basta Ya!" will still be ordered as beginning with "¡"; and any other alphabetical ordering done by the MediaWiki software will also be done in Unicode order.)

Articles beginning with a lowercase letter

The actual native names of articles cannot begin with a lowercase letter. The template {{lowercase title}} is written inside articles such as "eBay" to make the article title to appear to the reader as starting with a lowercase "e". But the article will be ordered on Category pages under "E", and will appear to the reader on Category pages under its true native name as "EBay".

This does not apply within articles

This page give no instructions for editors (except advice on using DEFAULTSORT), it exists simply to describe how the Mediawiki software orders pages. Don't consider sorting issues when deciding on article titles – whether an article name should begin with "A" or "Å" for instance should be determined by the WP:Manual of Style or other considerations.

By common practice, editors do not use Unicode order within articles, such as when making lists. Z and z should be treated identically, and for non-standard characters, either standard English alphabetizing rules are used – O, Ö, and Ô are identical, for instance – or language-specific order is used (thus, since in Finnish "Å" comes after "Z", this order could be used in a list about Finnish entities); this choice is at the discretion of the editor, but individual articles should be internally consistent.

See also

[edit]
  • "Magic word" {{PAGENAME}} which returns the true native name of an article or other page
  • Help:Special characters – how the software handles characters not found on a typical English keyboard
  • Unicode

Notes

[edit]
  1. ^
    However, a blank space after the last character – which would be an error – comes before any character. Thus, an article named "Pancake " would come before "Pancake!" (although "Pancake" (being shorter) would come before both).