Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Apostrophe
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Computing== In modern computing practice, Unicode is the standard and default method for character encoding. However, Unicode itself and many [[legacy applications]] have echoes of earlier practices. Furthermore, the limited [[character set]] provided by [[computer keyboard]]s has also required practical and pragmatic adjustments. These issues are detailed below. ===ASCII encoding=== The typewriter apostrophe, {{char|'}}, was inherited by computer keyboards, and is the only apostrophe [[Character (computing)|character]] available in the (7-bit) [[ASCII]] [[character encoding]], at code value [[Hexadecimal|0x]]27 (39). In ASCII, it may be used to represent any of left single [[quotation mark]], right single quotation mark, apostrophe, vertical line or [[prime (symbol)|prime]] (punctuation marks), or an [[acute accent]] (modifier letters). In Unicode, which is a superset of ASCII, it is encoded as {{unichar|0027}}. Many earlier (pre-1985) computer displays and printers rendered the ASCII apostrophe as a punctuation apostrophe, and rendered the [[backtick]] (freestanding [[grave accent]] symbol, {{char|`}}, 0x60, 96) as a matching left single quotation mark. This allowed a more "typeset" appearance of text: <code>``I can't''</code> would appear as {{tt|``I can´t´´}} on these systems. This can still be seen in many documents prepared at that time, and is still used in the [[TeX]] typesetting system to create typographic quotes. ===Punctuation apostrophe in 8-bit encodings=== Support for the punctuation apostrophe ( <span style="font-family:serif">’</span> ) was introduced in several 8-bit character encodings, such as the original [[Classic Mac OS|Apple Macintosh]] operating system's [[Mac Roman]] character set (in 1984), and later in the [[CP1252]] encoding of [[Microsoft Windows]]. Both sets also used this code point for a closing single quote. There is no such character in [[ISO 8859-1]]. The [[Microsoft Windows]] [[Windows code page|code page]] [[CP1252]] (sometimes incorrectly called ''ANSI'' or ''ISO-Latin'') contains the punctuation apostrophe at 0x92. Due to "smart quotes" in Microsoft software converting the ASCII apostrophe to this value, other software makers have been effectively forced to adopt this as a ''de facto'' convention. For instance, the [[HTML5]] standard specifies that this value is interpreted as this character from CP1252.<ref>{{cite web |url=http://www.w3.org/TR/html5/syntax.html#character-encodings-0 |title=8 The HTML syntax |author=<!--Staff writer(s); no by-line.--> |date=17 December 2012 |publisher=[[World Wide Web Consortium]] |access-date=14 July 2013 |archive-date=25 July 2013 |archive-url=https://web.archive.org/web/20130725201747/http://www.w3.org/TR/html5/syntax.html#character-encodings-0 |url-status=live}}</ref> Some earlier non-Microsoft browsers would display a '?' for this and make web pages composed with Microsoft software somewhat hard to read. In Unicode (which practically all vendors have adopted), this apostrophe is encoded as {{unichar|2019}}. (The canonical name reflects the primary usage; its further use as the preferred form for an apostrophe is recorded in the database.<ref>{{cite web |title=General Punctuation {{!}} Quotation marks and apostrophe |quote=this is the preferred character to use for apostrophe |url=https://www.unicode.org/charts/nameslist/n_2000.html}}</ref>) ===Entering apostrophes=== Although ubiquitous in typeset material, the punctuation apostrophe ({{serif|{{char|’}}}}) is rather difficult to enter on a computer, since it does not have its own key on most types of [[Computer keyboard|consumer keyboard]]. Outside the world of professional typesetting and graphic design, most people use the typewriter apostrophe ({{serif|{{char|'}}}}). Because typewriter apostrophes are now often [[Autocorrection|automatically converted]] to punctuation apostrophes by [[Word processor|word processing]] and similar software, the punctuation apostrophe routinely appears in documents produced by non-professionals (albeit sometimes incorrectly—see {{slink||Smart Quotes}} below). [[XML]] (and hence [[XHTML]]) defines an <code>&apos;</code> [[character entity reference]] for the ASCII typewriter apostrophe. This entity reference is officially supported in HTML since [[HTML 5]].{{NoteTag|It is ''not'' defined in [[HTML 4]]<ref>{{cite web |url=http://www.w3.org/TR/1999/REC-html401-19991224/sgml/entities.html |title=Character entity references in HTML 4 |publisher=World Wide Web Consortium |date=24 December 1999 |access-date=15 October 2011 |archive-date=11 May 2010 |archive-url=https://web.archive.org/web/20100511050448/http://www.w3.org/TR/1999/REC-html401-19991224/sgml/entities.html |url-status=live}}</ref> despite all the other predefined character entities from XML being defined.}} ===Smart quotes=== To make punctuation apostrophes easier to enter, [[word processing]] and publishing software often convert typewriter apostrophes to punctuation apostrophes during text entry (at the same time converting opening and closing single and double quotes to their standard left-handed or right-handed forms). A similar facility may be offered on web servers after submitting text in a form field, e.g. on weblogs or free encyclopedias. This is known as the ''smart quotes'' feature; apostrophes and quotation marks that are not automatically altered by computer programs are known as ''dumb quotes''. Such conversion is not always correct. Smart quotes features often incorrectly convert a leading apostrophe to an opening quotation mark (e.g., in abbreviations of years: ''<span style="font-family: serif">‘</span>29'' rather than the correct ''<span style="font-family:serif">’</span>29'' for the years ''1929'' or ''2029'' (depending on context); or ''<span style="font-family: serif">‘</span>twas'' instead of ''<span style="font-family: serif">’</span>twas'' as the [[archaism|archaic]] abbreviation of ''it was''). Smart quote features also often fail to recognise situations when a [[prime (symbol)|prime]] rather than an apostrophe is needed; for example, incorrectly rendering the latitude 49° {{prime|53}} 08″ as 49° 53<span style="font-family: serif">’</span> 08<span style="font-family: serif">”</span>. In [[Microsoft Word]] it is possible to turn smart quotes off (in some versions, by navigating through ''Tools'', ''AutoCorrect'', ''AutoFormat as you type'', and then unchecking the appropriate option). Alternatively, typing Control-Z (for ''Undo'') immediately after entering the apostrophe will convert it back to a typewriter apostrophe. In Microsoft Word for Windows, holding down the Control key while typing two apostrophes will produce a single punctuation apostrophe. ===Programming=== Some programming languages, like [[Pascal (programming language)|Pascal]], use the ASCII apostrophe to delimit [[string literal]]s. In many languages, including [[JavaScript]], [[ECMAScript]], and [[Python (programming language)|Python]], either the apostrophe or the double quote may be used, allowing string literals to contain the other character (but not to contain both without using an [[escape character]]), e.g. <code>foo='He said "Bar!"';</code>. Strings delimited with apostrophes are often called ''single quoted''. Some languages, such as [[Perl]], [[PHP]], and many shell languages, treat single quoted strings as "raw" strings, while double quoted strings have expressions (such as <code>"$variable"</code>) replaced with their values when interpreted. The [[C (programming language)|C programming language]] (and many [[List of C-family programming languages|derived languages]] like [[C++]], [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]], and [[Scala (programming language)|Scala]]) uses apostrophes to delimit a [[character literal]]. In these languages a character is a different object than a one-letter string. In [[C++]], since [[C++14]], apostrophes can be included as optional digit separators in numeric literals. In [[Visual Basic]] (and earlier Microsoft BASIC dialects such as QuickBASIC) an apostrophe is used to denote the start of a comment.{{NoteTag|As a comment character in MS BASIC, the apostrophe is in most cases an abbreviation of the REM statement, which can be appended to the end of almost any line with a colon (:). The cases where the apostrophe is not an abbreviation for <code>REM</code> would be those where the apostrophe is allowed but a REM statement is not. Note that there are also cases of the reverse constraint; for example, in QuickBASIC, a comment at the end of a DATA statement line cannot start with an apostrophe but must use <code>: REM</code>.}} In the [[Lisp (programming language)|Lisp]] family of programming languages, an apostrophe is shorthand for the <code>quote</code> operator. In [[Rust (programming language)|Rust]], in addition to being used to delimit a character literal, an apostrophe can start an explicit [[Object lifetime|lifetime]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Apostrophe
(section)
Add topic