Wikipedia:Naming conventions (technical restrictions)

From Wikipedia, the free encyclopedia

✔ This page documents an English Wikipedia naming convention. It is a generally accepted standard that editors should follow, though it should be treated with common sense and the occasional exception. When editing this page, please ensure that your revision reflects consensus. When in doubt, discuss first on the talk page.
Shortcut:
WP:NCTR

Some article titles are not displayed correctly because of limitations in the original MediaWiki software. Usually, a template can be added to the article to resolve the problem. For example, {{lowercase}} makes EBay display as "eBay", IPod as "iPod", etc.

IMPORTANT NOTE: These templates should never be subst'd. To see what articles have these naming problems you can click on "What links here" in the toolbox for each template. If the template is substituted, it will no longer be linked.

ANOTHER IMPORTANT NOTE: before declaring the current title to be "wrong" with the wrongtitle template or one of the more specific templates please consider if the title you are proposing as "correct" would really comply with Wikipedia conventions particularly Wikipedia:Naming conventions (use English), Wikipedia:Manual of Style (capital letters) and Wikipedia:Manual of Style (trademarks).

Contents

[edit] Lower case first letter

See also: m:Help:Page name#Case-sensitivity

By default, titles linked to are forced to start with capital letters, although subsequent characters can have any case, i.e.,

foo is treated the same as Foo

The MediaWiki software is configured to transform the first letter to uppercase, although code has been written to allow designated articles to skip this transformation.

Examples of large articles that may be affected by this problem are eBay (located at EBay), iPod (located at IPod), s-CRY-ed (located at S-CRY-ed), and e (mathematical constant) located at E (mathematical constant).

This also means that the page Long s, on the character ſ, cannot be moved to (or redirected from) ſ, as ſ is a lowercase letter whose uppercase form is S.

To fix this problem, include the following tag found below at the top of the article page (plus optionally, at the top of its discussion page).

{{lowercase}}

(Note: This is due to the present lack of infrastructure for case-insensitive title matching with same 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.)

[edit] Characters totally forbidden in page titles

See also: Help:Link#Section linking (anchors) and MediaWiki:Badtitletext

The following characters are not allowed in page titles:

# < > [ ] | { }

Often, you can simply remove these characters (e.g. MARRS instead of M|A|R|R|S). However, it may be necessary to spell out the character (e.g. Gtk Sharp instead of Gtk#) or use another substitute.

Related templates:

{{pound|title=Correct title}}
{{bracketed|title=Correct title}}
{{wrongtitle|title=Correct title}}

[edit] Characters with some problems but not totally forbidden

[edit] 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 links to it from outside the main namespace 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]], [[&#47;dev/null]] or [[&#x2f;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.

[edit] Question mark

Special attention should also be paid to the use of the question mark (?).

A page like Switch? can be created as usual by following the link. However, when typed into the address bar of a browser, the question mark and everything following the question mark will be cut off. For example, typing in

http://en.wikipedia.org/wiki/Switch? 

will cause you to be directed to switch. Instead, use

http://en.wikipedia.org/wiki/Switch%3F

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.

[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.

[edit] 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.

Use {{pound|title=Correct title}} to correct this.

[edit] 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 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).

[edit] 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. Likewise, http://en.wikipedia.org/wiki/%2542 gives a bad title error.

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.

[edit] 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:

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.

Articles with this type of conflict should be tagged with {{namespace}}.

Also, article titles cannot begin with a :. If the article title begins with a colon, such as :Wumpscut:, use {{wrongtitle|title=:Correct title}} to achieve the correct display. The easiest way to link to articles that begin with a colon is to add an extra colon at the beginning, for example [[::Wumpscut:]] produces :Wumpscut:.

Article names starting with two or more colons, and links starting with three or more colons are forbidden: [[:::CueCat]] produces [[:::CueCat]], and http://en.wikipedia.org/wiki/::CueCat produces a bad title error.

Otherwise, embedded colons are OK, for example A:.

[edit] Subscripts and superscripts

See also: Unicode subscripts and superscripts and Ordinal indicator

If you need to use a superscript 1, 2, 3, a, or o in a page title, you may do so without trouble by copying and pasting these special Unicode characters: ¹, ², ³, ª, º (they show up better when used in a page title). However, to ensure consistent styling and avoid creating accessibility problems, do not use these characters in the body of the article. Instead, use <sup>1</sup>, <sup>2</sup>, and <sup>3</sup>. When linking to articles with superscripts and subscripts, do not use the Unicode character directly. For example, use [[E=MC² (song)|E=MC<sup>2</sup> (song)]] when linking to E=MC2 (song).

If you need to use a superscript or subscript other than a superscript 1, 2, or 3, use {{downsize}}. For example: {{downsize|title=L<sup>p</sup> space}} makes the article Lp space appear as "Lp space".

Both superscript and subscript Unicode characters are available for all the numbers and some letters and symbols, but only the superscript 1, 2, 3, a, and o work on older web browsers and operating systems. Thus, it is recommended that you wait to use characters other than superscript 1, 2, 3, a, and o until support for these characters is more widespread.

An attempt to use the full range of Unicode characters was briefly made for minor planets, but was reverted after it became clear it was problematic. See also: Talk:(136108) 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.

[edit] Pictorial names

This symbol 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.

[edit] Title length

Titles must be less than 256 bytes long when encoded in UTF-8; a title this long would probably violate other style guidelines, though.

Related template: {{longtitle}}

[edit] Browser support limitations

See also: Wikipedia:Naming conventions (standard letters with diacritics)#Printability

Use precomposed characters when possible.

Use the text normalization NFC [1].

[edit] See also