Wikipedia:Naming conventions (technical restrictions)
From Free net encyclopedia
Template:Wikipedia subcat guideline Template:Main
Some article titles cannot be named correctly due to limitations in the MediaWiki software, Eg. the first character is forced to be upper case. Currently known limitations are listed below in this article, though there may be others.
Where you want to draw readers' attention to this kind of situation (except for a lower case first letter as explained below), insert something like this before the opening paragraph of the article:
{{wrongtitle|title=Correct Title}}
Which will produce the text:
- Template:Selfref}}}}. It appears incorrectly here due to technical restrictions.}}
For a list of articles that are affected by these problems, see Special:Whatlinkshere/Template:Wrongtitle.
Contents |
Excluded characters
Characters not allowed at all in page titles
The following characters are not allowed in page titles:
# < > [ ] | { }
and the ASCII character codes 0...31 and 127.
Attempting to use disallowed characters will result in a "bad title" error.
Forward slash
The forward slash (/) is used to separate subpages from their main pages. While subpages are now disabled in the main namespace there are still a couple of side effects of the system to support them that affect articles.
- If a / is the first character of the title then normal links to it will not work as expected (they will prepend the title of the current page); a workaround is to prepend a colon, or to use a html entity as the beginning of the link, e.g. [[:/dev/null]], [[/dev/null]] or [[/dev/null]] to get to /dev/null.
- Subpages are still enabled in the talk namespace as they are widely used for archiving old discussion. Therefore if an article has a forward slash in its name its corresponding talk page will have a subpage level-up link at the top (for example Talk:R/2004 S 1 has a link to Talk:R at the top).
See Wikipedia:Articles with slashes in title for a list of such articles.
Question mark
Special attention should also be paid to the use of the question mark (?).
A page like Switch? (The Price is Right pricing game) can be created as usual by following the link. However, when typed into the address bar of a browser, everything following the question mark will be cut off. For example, typing in
http://en.wikipedia.org/wiki/Switch?_(The_Price_is_Right_pricing_game)
will cause you to be directed to switch. Instead, use
http://en.wikipedia.org/wiki/Switch%3F_(The_Price_is_Right_pricing_game)
This is a consequence of web server software treating everything after a ? as a query string. Whilst it would be possible to glue the url back together this would cause issues with urls like http://en.wikipedia.org/wiki/Switch?action=edit which is equivalent to http://en.wikipedia.org/w/index.php?title=Switch&action=edit
Plus
The symbol + can sometimes cause problems when used in URLs. In URLs using the "/wiki/Article_name" notation the plus sign has no special meaning, but in the "/w/index.php?title=Article_name" notation (and in the parts of an URL after the question mark in general) the plus sign is replaced with a space. To get an actual plus sign, it must be encoded as "%2B".
For example, http://en.wikipedia.org/wiki/C++ will lead to the article on the [[C++]] programming language, but http://en.wikipedia.org/w/index.php?title=C++ will lead to C instead (as the trailing spaces are stripped). To avoid this, use http://en.wikipedia.org/w/index.php?title=C%2B%2B instead.
Spaces and underscores
In links spaces and underscores (_) are treated equivalently. The underscore is used in the url while the space is used in displayed titles. This was done to make the urls for page titles containing spaces more readable. Leading and trailing spaces and/or underscores are stripped, multiple spaces and/or underscores are squashed together to a single underscore and page names consisting of only spaces and/or underscores are not allowed at all. However, an article name cannot contain an underscore as the underscore would be converted to a space.
Dot
Pages named . or .. and page names starting with ./ or ../ are not allowed at all.
Pages with dots and slashes combined in certain other ways, e.g. /. (which is a redirect to slashdot), are allowed by MediaWiki, but there are major problems with links to them (probably caused by path parsing code in browsers, but see also #Forward_slash above).
Percent
MediaWiki supports percent-encoding in wiki links, in which a percent followed by two hexadecimal digits is converted to a single character. Thus, %25 is the same as %. Article titles containing a percent-encoded sequence are not allowed. For example, [[%2542]] should link to "%42", but doesn't link anywhere. A possible workaround would be to use non-ascii characters that look the same as the ones required; however this may create issues with older browsers.
If the two characters following the percent do not form a valid pair of hexadecimal digits, it works as expected.
Subscripts and superscripts
Currently, there is no way to directly include subscripts or superscripts in a page name, unless you use the unicode characters (which do not work well in some browsers), the way they would normally be included in an article (using <sub> and <sup>).
Examples: NaKATPase, Lp space.
Attempting to workaround using Unicode subscripts and superscripts does not work on all browsers (depending also on the installed fonts and operating system), and only a small number of subscript and superscript characters exist on Unicode. Such an attempt was briefly made for minor planets, but was reverted after it became clear it was problematic. See also: Talk:2003 EL61#₆₁ characters ?, Talk:2003 UB313/Archive 1#Titling Policy Strawman, Wikipedia:Naming conventions (Unicode) (draft)#Superscripts and subscripts, Wikipedia talk:Naming conventions (Unicode) (draft)#Subs/Supers.
However, superscripts ¹, ², and ³ (which also exist on ISO 8859-1) do not have the same browser support limitations and can be used without problems, as long as a redirect from the title without the superscript is used.
Also at least one name (TEX) is correctly written with a full size character lower than the normal ones. In page text this is achieved by combining sub and big but again this can't be done in article titles.
Pictorial names
Image:Princesymbol.png was for many years the proper name of Prince. MediaWiki does not support including an image in the title of an article. Such images should be replaced by Unicode characters. On the other hand, the peace symbol used in Sign “☮” the Times is a valid Unicode character (U+262E), so it can be included in this title.
Title length
Titles must be less than or equal to 256 bytes long when encoded in utf-8.
- Note that pages whose title is the maximum length cannot be moved or undeleted. See Bugzilla:5570
Configuration related limitations
The following limitations are not due to the MediaWiki software but to the settings of the English language Wikipedia. See the appropriate policy pages.
Lower case first letter
Every link in Wikipedia is forced to start with a capital, though subsequent characters can have any case.
This decision has been reached because :
- Wikipedia uses case-sensitive links.
- Wikipedia forces the first character of every sentence - including links - to be a capital.
Thus when a link occurs as the first word of a sentence its first character is forced to upper case and (given the case sensitive linking) it would be broken if it linked to an entry with a leading lower case character. There are numerous possible solutions to this issue, but the one that has been adopted is to set the English language encyclopedia to require an upper case character as the first letter of a page title, and force every link to have an upper case first character.
Note: The template Template:Lowercase has been created as a proposed alternative to Template:Wrongtitle for this limitation. The reason for its creation is discussed here.
Examples of large articles affected by this problem include:
This also means that the page Long s, on the character ſ, cannot be moved to ſ, as ſ is a lowercase letter whose uppercase form is S.
(Note: This is due to the present lack of infrastructure for case-insensitive title matching with sane case-preserving semantics in the MediaWiki software. The first letter of any link is forced to be upper case in order to allow links to work naturally both at the beginning of a sentence and in the middle. In the future, there may be a way added to make the initial letter appear lower case without breaking hundreds of thousands of links on the wiki or creating new avenues of abuse; however, there is currently no way to do this.)
Colon
Article titles with a colon preceded by the title of a namespace are interpreted as being pages in that namespace so can't be used for articles in the main namespace. Article titles that would clash with an interwiki link prefix are also disallowed by the software (with a "bad title" error).
Examples of articles afflicted by this problem include:
- Help: a Day in the Life is located at Help-a Day in the Life (Help: is a Wikipedia namespace)
- Q: Are We Not Men? A: We Are Devo! is located at Question: Are We Not Men? Answer: We Are Devo! (Q: is a shortcut to Wikiquote)
Before adding a new namespace or interwiki prefix, care must be taken to move any existing articles out of the way. However this is a task for server admins (developers) not wiki sysops or normal users.
Also, article titles cannot begin with a :. For example, [[:CueCat]] produces CueCat.
Browser support limitations
For now, use only precomposed characters. Avoid using combining diacritical marks.
Use the text normalization NFC [1].
See also
ca:Viquipèdia:Anomenar pàgines (restriccions tècniques) cs:Wikipedie:Název článku/Omezení de:Wikipedia:Benennungskonventionen (technische Einschränkungen) es:Wikipedia:Restricciones técnicas en títulos eo:Vikipedio:Nomoj de titoloj (teknikaj limigoj) pl:Wikipedia:Nazwa strony (ograniczenia) pt:Wikipedia:Convenções para nomes (limitações técnicas) ru:Википедия:Соглашение об именах (технические ограничения) zh:Wikipedia:命名常规 (技术限制)