Wikipedia:Naming conventions (technical restrictions)
From Wikipedia, the free encyclopedia
Some article titles are not displayed correctly because of limitations in the original MediaWiki software, e.g. 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 and clashes with namespaces which have their own templates), insert something like this before the opening paragraph of the article:
{{wrongtitle|title=Correct title}}
Which will produce the text:
- The correct title of this article is Correct title. It appears incorrectly here because of technical restrictions.
It will also use JavaScript to modify the title of the page (which shows in the top bar of the browser window), if this is supported.
IMPORTANT NOTE: These templates should never be substituted using {{subst:}}. 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. When these technical restrictions are addressed, it will be necessary to use the "What links here" page to find the articles and rename them.
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] Characters totally forbidden 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.
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.
[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]], [[/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.
[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.
[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, 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).
[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:
- 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)
- Project: Mersh is located at Project Mersh (Project: goes to the Wikipedia namespace)
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. Interestingly, [[::CueCat]] produces :CueCat, which also links to the same article, as does http://en.wikipedia.org/wiki/:CueCat . 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:.
Articles with this type of conflict should be tagged with {{namespace}}.
See Special:Whatlinkshere/Template:namespace for a list of these articles.
[edit] 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.
[edit] Pictorial names
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 or equal to 256 bytes long when encoded in utf-8; a title this long would probably violate other style guidelines, though.
[edit] Lower case first letter
- See also: m:Help:Page name#Case-sensitivity
Titles linked to are forced to start with capital letters, although subsequent characters can have any case, i.e.,
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 affected by this problem are eBay, which is located at EBay, iSketch, which is located at ISketch, iPod, which is changed to IPod, and "s-CRY-ed", which is located at S-CRY-ed.
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 text at the top of the article page:
{{lowercase|lowercasetitle}}
In JavaScript-enabled browsers, the initial letter of the page title will become lowercase. If the browser has JavaScript disabled, a notice will be displayed like this:
- The correct title of this article is Wikipedia:lowercasetitle. The initial letter is shown capitalized due to technical restrictions.
See Special:Whatlinkshere/Template:Lowercase for a list of these articles.
(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.)
(Note (2): This is no longer an issue with browsers such as Mozilla Firefox 2.0)
[edit] Browser support limitations
For now, use only precomposed characters. Avoid using combining diacritical marks.
Use the text normalization NFC [1].
[edit] Dashes
Don't use n-dashes (–), m-dashes (—) or any other type of dash, apart from standard hyphens (-) in page names of mainspace pages (articles), because such symbols, apart from regular hyphens, prevent some systems (including Internet Explorer 6 on Windows XP) from saving the page as a file (i.e., downloading a copy to a computer).
Non-hyphen dashes can, however, be used in redirect pages if an enhanced precision for the page name is desired for use in wikilinks elsewhere. (Rationale: see Wikipedia talk:Manual of Style (dashes)#Dashes in article names.)