ASCII: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m Sponsorizzazione non necessaria di software proprietario |
m clean up, replaced: lingua=inglese → lingua=en |
||
(239 versioni intermedie di oltre 100 utenti non mostrate) | |||
Riga 1:
{{Nota disambigua
{{F|terminologia informatica|giugno 2012}}
[[File:ASCII full.svg|frame|Esistono
'''ASCII''' ([[acronimo]] di '''American Standard Code for Information Interchange''', {{Lett|codice standard americano per lo scambio di informazioni}}) è un [[codice (teoria dell'informazione)|codice]] per la [[codifica di caratteri]]. La prima edizione dello [[Norma tecnica|standard]] ASCII è stata pubblicata dall'[[American National Standards Institute]] (ANSI) nel 1963<ref>{{Cita web|url=http://edition.cnn.com/TECH/computing/9907/06/1963.idg/|titolo=CNN - 1963: The debut of ASCII - July 6, 1999|sito=edition.cnn.com|accesso=2022-03-21|urlarchivio=https://web.archive.org/web/20130617155922/http://edition.cnn.com/TECH/computing/9907/06/1963.idg/|urlmorto=sì}}</ref>, quindi il codice ha subito un'importante revisione nel 1968<ref>{{Cita web|url=https://www.sr-ix.com/Archive/CharCodeHist/index.html#ASCII-1967|titolo=World Power Systems:Texts:Annotated history of charactercodes|sito=www.sr-ix.com|accesso=2022-03-21|urlarchivio=https://web.archive.org/web/20160522024759/http://worldpowersystems.com/J/codes/#ASCII-1967|urlmorto=sì}}</ref>. L'aggiornamento più recente risale al 1986<ref>{{Cita pubblicazione|data=1974|titolo=Federal Information Processing Standards Publication: code extension techniques for use with the 7-bit coded character set of American national standard code for information interchange|editore=National Bureau of Standards|accesso=2022-03-21|url=http://dx.doi.org/10.6028/nbs.fips.1-2-1974}}</ref>. In italiano viene pronunciato ''aschi'' {{IPA|/ˈaski/|it}} o ''asci'' {{IPA|/ˈaʃʃi/|it}}<ref>{{Treccani|ascii|v=yes}}</ref>, mentre la pronuncia originale inglese è ''askey'' {{IPA|/ˈæski/|en}}.
== Storia ==
[[File:
Con ''US-ASCII'' si intende un sistema di codifica dei caratteri a 7 bit, comunemente utilizzato nei calcolatori, proposto dall'ingegnere dell'[[IBM]] [[Bob Bemer]] nel [[1961]], e successivamente accettato come [[norma
Alla specifica iniziale basata su codici di 7 [[bit]] fecero seguito negli anni molte proposte di estensione ad 8 bit, con lo scopo di raddoppiare il numero di caratteri rappresentabili. Tuttavia nessuna estensione è uno standard internazionale. Nei personal computer si fa e si faceva uso di una di una serie di estensioni locali e configurabili in base al paese, spesso indicate con ''[[ASCII esteso|extended ASCII]]'' o ''high ASCII'' e non sono mai standard, per esempio queste codifiche sono differenti da paese a paese e una stessa nazione può avere più codifiche differenti attivabili, inoltre il set utilizzato in sistemi operativi come CP/M era diverso per ogni produttore, e a sua volta differente dai set utilizzati in MS-DOS, a sua volta diverso da quelli di Windows, Linux e MacOS. Inoltre i set multipli e localizzati sono nemmeno univoci perché ogni sistema, come MS-DOS, ha spesso più sotto-sistemi di estensione (codepage). Per esempio alcuni sistemi usano delle sottopagine dello standard 646, nei Mac c'era la gestione Mac Roman, in MS-DOS si usavano spesso sotto-pagine dei codepage 437, 850, 852, 1252, ISO 8859-1 in occidente (ognuno con una serie di sotto-pagine), del 866 nell'ex blocco sovietico In questo ASCII esteso, i caratteri aggiunti sono ad esempio vocali accentate, simboli semigrafici e altri simboli di uso meno comune, pensati anche per adattarsi alle specificità delle diverse lingue<ref>{{Cita web|url=https://www.ionos.it/digitalguide/server/know-how/ascii-american-standard-code-for-information-interchange/|titolo=ASCII-American-Standard-Code-for-Information-Interchange|sito=IONOS Digitalguide|lingua=it|accesso=2022-03-21}}</ref>. A sua volta il problema della rappresentazione nelle varie lingue è stato superato dalle codifiche Escape e dai codici ANSI, e poi esteso e uniformato con i vari standard Unicode, mentre l'unico ASCII davvero standard rimane quello a 7 bit. L'ottavo bit può essere utilizzato per estensioni più o meno personalizzate oppure per il controllo di parità nelle trasmissioni, cosa che avviene per esempio nelle trasmissioni seriali con RS-232C (oggi incapsulata nelle porte USB per i PC domestici), RS-485 e RS-488.
== ASCII ed UTF-8 ==
{{vedi anche|UTF-8}}
Lo standard successore di ASCII è l'[[UTF-8]], che è diventato la codifica principale di [[Unicode]] per internet secondo il [[W3C]], che pur non impedendo altre codifiche (purché correttamente dichiarate), lo consiglia e lo usa quasi sistematicamente negli esempi del suo sito<ref>{{Cita web|url = https://www.w3.org/International/O-charset.en.php|titolo = Character encodings|sito = W3C|accesso = 22 giugno 2015|lingua = en}}</ref>, fornendo anche le istruzioni per convertire i documenti (cosa che non fornisce per tutte le codifiche)<ref>{{Cita web|url = https://www.w3.org/International/questions/qa-changing-encoding|titolo = Changing an HTML page encoding to UTF-8|sito = W3C|accesso = 22 giugno 2015|lingua = en}}</ref>. Questa codifica di [[Unicode]], che ormai è universalmente accettata da ogni nuovo programma, offre caratteristiche interessanti grazie al fatto di sfruttare il bit di controllo del vecchio ASCII in modo più efficiente. Se da una parte lo prepara per la pensione, UTF-8 in un certo senso ha reso molto più longevo l'ASCII, inglobandolo in una codifica più adatta alle esigenze attuali. Infatti le comunicazioni sono in centinaia di lingue, ed inoltre diverse lingue possono convivere in uno stesso documento, o in uno stesso programma: si pensi ai [[software]] di [[messaggistica istantanea]] che possono contenere contatti da varie parti del mondo dei quali visualizzare correttamente i nomi.
UTF-8 infatti si distingue dalle altre codifiche Unicode perché sfrutta il vecchio bit di parità di ASCII, non come bit di controllo, bensì come indicatore: analizza ogni byte, e se al posto del vecchio bit di parità c'è 0, allora il byte sarà letto come ASCII a 7
Il vantaggio è che è possibile scrivere un testo in Italiano ed usare un numero di byte di poco maggiore rispetto ad una codifica di ASCII esteso (
== Tabella dei caratteri ==
La tabella seguente è relativa al codice US ASCII, [[ANSI]] X3.4-1986 (''[[ISO]] 646 International Reference Version''). I codici decimali da 0 a 31 e il 127 sono caratteri non stampabili (
=== Non stampabili ===
{|
|-
! [[Sistema numerico binario|Binario]] !! [[sistema numerico ottale|Ottale]] !! [[sistema numerico decimale|Decimale]]
|-
|000 0000 || style="background:lightblue;" | 000 || style="background:#CFF;" | 0 || style="background:lightblue;" | 00
Riga 47 ⟶ 32:
|-
|000 0001 || style="background:lightblue;" | 001 || style="background:#CFF;" | 1 || style="background:lightblue;" | 01
|
|-
|000 0010 || style="background:lightblue;" | 002 || style="background:#CFF;" | 2 || style="background:lightblue;" | 02
|STX || <
|-
|000 0011 || style="background:lightblue;" | 003 || style="background:#CFF;" | 3 || style="background:lightblue;" | 03
|ETX || <
|-
|000 0100 || style="background:lightblue;" | 004 || style="background:#CFF;" | 4 || style="background:lightblue;" | 04
|EOT || <
|-
|000 0101 || style="background:lightblue;" | 005 || style="background:#CFF;" | 5 || style="background:lightblue;" | 05
|ENQ || <
|-
|000 0110 || style="background:lightblue;" | 006 || style="background:#CFF;" | 6 || style="background:lightblue;" | 06
|ACK || <
|-
|000 0111 || style="background:lightblue;" | 007 || style="background:#CFF;" | 7 || style="background:lightblue;" | 07
|BEL
|<
|^G
| \a
Riga 73 ⟶ 58:
|000 1000 || style="background:lightblue;" | 010 || style="background:#CFF;" | 8 || style="background:lightblue;" | 08
|BS
|<
|^H
| \b
| align="left" |◘
|-
|000 1001 || style="background:lightblue;" | 011 || style="background:#CFF;"
|
|<
|^I
| \t
Riga 87 ⟶ 72:
|000 1010 || style="background:lightblue;" | 012 || style="background:#CFF;" | 10 || style="background:lightblue;" | 0A
|LF
|<
|^J
| \n
Riga 94 ⟶ 79:
|000 1011 || style="background:lightblue;" | 013 || style="background:#CFF;" | 11 || style="background:lightblue;" | 0B
|VT
|<
|^K
| \v
Riga 101 ⟶ 86:
|000 1100 || style="background:lightblue;" | 014 || style="background:#CFF;" | 12 || style="background:lightblue;" | 0C
|FF
|<
|^L
| \f
Riga 108 ⟶ 93:
|000 1101 || style="background:lightblue;" | 015 || style="background:#CFF;" | 13 || style="background:lightblue;" | 0D
|CR
|<
|^M
| \r
Riga 115 ⟶ 100:
|000 1110 || style="background:lightblue;" | 016 || style="background:#CFF;" | 14 || style="background:lightblue;" | 0E
|SO
|<
|^N
|
| align="left" |♫
|-
|000 1111
|SI
|<
|^O
|
| align="left" |☼
|-
|001 0000
|DLE
|<
|^P
|
Riga 136 ⟶ 121:
|001 0001 || style="background:lightblue;" | 021 || style="background:#CFF;" | 17 || style="background:lightblue;" | 11
|DC1
|<
|^Q
|
Riga 143 ⟶ 128:
|001 0010 || style="background:lightblue;" | 022 || style="background:#CFF;" | 18 || style="background:lightblue;" | 12
|DC2
|<
|^R
|
Riga 150 ⟶ 135:
|001 0011 || style="background:lightblue;" | 023 || style="background:#CFF;" | 19 || style="background:lightblue;" | 13
|DC3
|<
|^S
|
Riga 157 ⟶ 142:
|001 0100 || style="background:lightblue;" | 024 || style="background:#CFF;" | 20 || style="background:lightblue;" | 14
|DC4
|<
|^T
|
Riga 164 ⟶ 149:
|001 0101 || style="background:lightblue;" | 025 || style="background:#CFF;" | 21 || style="background:lightblue;" | 15
|NAK
|<
|^U
|
Riga 171 ⟶ 156:
|001 0110 || style="background:lightblue;" | 026 || style="background:#CFF;" | 22 || style="background:lightblue;" | 16
|SYN
|<
|^V
|
Riga 178 ⟶ 163:
|001 0111 || style="background:lightblue;" | 027 || style="background:#CFF;" | 23 || style="background:lightblue;" | 17
|ETB
|<
|^W
|
Riga 185 ⟶ 170:
|001 1000 || style="background:lightblue;" | 030 || style="background:#CFF;" | 24 || style="background:lightblue;" | 18
|CAN
|<
|^X
|
Riga 192 ⟶ 177:
|001 1001 || style="background:lightblue;" | 031 || style="background:#CFF;" | 25 || style="background:lightblue;" | 19
|EM
|<
|^Y
|
Riga 199 ⟶ 184:
|001 1010 || style="background:lightblue;" | 032 || style="background:#CFF;" | 26 || style="background:lightblue;" | 1A
|SUB
|<
|^Z
|
Riga 206 ⟶ 191:
|001 1011 || style="background:lightblue;" | 033 || style="background:#CFF;" | 27 || style="background:lightblue;" | 1B
|ESC
|<
|^<nowiki>[</nowiki>
|
Riga 213 ⟶ 198:
|001 1100 || style="background:lightblue;" | 034 || style="background:#CFF;" | 28 || style="background:lightblue;" | 1C
|FS
|<
|^\
|
Riga 220 ⟶ 205:
|001 1101 || style="background:lightblue;" | 035 || style="background:#CFF;" | 29 || style="background:lightblue;" | 1D
|GS
|<
|^<nowiki>]</nowiki>
|
Riga 227 ⟶ 212:
|001 1110 || style="background:lightblue;" | 036 || style="background:#CFF;" | 30 || style="background:lightblue;" | 1E
|RS
|<
|^^
|
Riga 234 ⟶ 219:
|001 1111 || style="background:lightblue;" | 037 || style="background:#CFF;" | 31 || style="background:lightblue;" | 1F
|US
|<
|^_
|
Riga 241 ⟶ 226:
| colspan="9" |
|-
|111 1111 || style="background:lightblue;" |
|DEL
|<
|^?
|
| align="left" | Delete (
|}
=== Stampabili ===
[[File:ASCII Code Chart.svg|thumb|left|upright=1.8|Tabella di conversione da esadecimale a caratteri]]
{{Clear}}
{| class="wikitable" style="text-align: center; float:left;"
|- valign="bottom"
![[Sistema numerico binario|Binario]] !! {{
|-
|010 0000 ||style="background:lightblue;"| 040 ||style="background:#CCFFFF;"| 32 ||style="background:lightblue;"| 20 ||
|-
|010 0001 ||style="background:lightblue;"| 041 ||style="background:#CCFFFF;"| 33 ||style="background:lightblue;"| 21 || [[Punto esclamativo|!]]
Riga 271 ⟶ 257:
|010 0111 ||style="background:lightblue;"| 047 ||style="background:#CCFFFF;"| 39 ||style="background:lightblue;"| 27 || [[']]
|-
|010 1000 ||style="background:lightblue;"| 050 ||style="background:#CCFFFF;"| 40 ||style="background:lightblue;"| 28 || [[Parentesi#
|-
|010 1001 ||style="background:lightblue;"| 051 ||style="background:#CCFFFF;"| 41 ||style="background:lightblue;"| 29 || [[Parentesi#
|-
|010 1010 ||style="background:lightblue;"| 052 ||style="background:#CCFFFF;"| 42 ||style="background:lightblue;"| 2A || [[
|-
|010 1011 ||style="background:lightblue;"| 053 ||style="background:#CCFFFF;"| 43 ||style="background:lightblue;"| 2B || [[+]]
Riga 285 ⟶ 271:
|010 1110 ||style="background:lightblue;"| 056 ||style="background:#CCFFFF;"| 46 ||style="background:lightblue;"| 2E || [[Punto fermo|.]]
|-
|010 1111 ||style="background:lightblue;"| 057 ||style="background:#CCFFFF;"| 47 ||style="background:lightblue;"| 2F || [[Barra
|-
|011 0000 ||style="background:lightblue;"| 060 ||style="background:#CCFFFF;"| 48 ||style="background:lightblue;"| 30 || [[Zero|0]]
Riga 303 ⟶ 289:
|011 0111 ||style="background:lightblue;"| 067 ||style="background:#CCFFFF;"| 55 ||style="background:lightblue;"| 37 || [[Sette|7]]
|-
|011 1000 ||style="background:lightblue;"| 070 ||style="background:#CCFFFF;"| 56 ||style="background:lightblue;"| 38 || [[
|-
|011 1001 ||style="background:lightblue;"| 071 ||style="background:#CCFFFF;"| 57 ||style="background:lightblue;"| 39 || [[Nove|9]]
Riga 309 ⟶ 295:
|011 1010 ||style="background:lightblue;"| 072 ||style="background:#CCFFFF;"| 58 ||style="background:lightblue;"| 3A || [[Due punti|:]]
|-
|011 1011 ||style="background:lightblue;"| 073 ||style="background:#CCFFFF;"| 59 ||style="background:lightblue;"| 3B || [[Punto e virgola|;]]
|-
|011 1100 ||style="background:lightblue;"| 074 ||style="background:#CCFFFF;"| 60 ||style="background:lightblue;"| 3C || [[Parentesi#Le parentesi uncinate o angolari|<]]
Riga 322 ⟶ 308:
{| class="wikitable" style="text-align:center; float:left;"
|- valign="bottom"
![[Sistema numerico binario|Binario]] !! {{
|-
|100 0000 ||style="background:lightblue;"| 100 ||style="background:#CCFFFF;"| 64 ||style="background:lightblue;"| 40 || [[@]]
Riga 380 ⟶ 366:
|101 1011 ||style="background:lightblue;"| 133 ||style="background:#CCFFFF;"| 91 ||style="background:lightblue;"| 5B || [[Parentesi quadra|[]]
|-
|101 1100 ||style="background:lightblue;"| 134 ||style="background:#CCFFFF;"| 92 ||style="background:lightblue;"| 5C || [[
|-
|101 1101 ||style="background:lightblue;"| 135 ||style="background:#CCFFFF;"| 93 ||style="background:lightblue;"| 5D || [[Parentesi quadra|]]]
Riga 391 ⟶ 377:
{| class="wikitable" style="text-align:center; float:left;"
|- valign="bottom"
![[Sistema numerico binario|Binario]] !! {{
|-
|110 0000 ||style="background:lightblue;"| 140 ||style="background:#CCFFFF;"| 96 ||style="background:lightblue;"| 60 || [[`]]
Riga 447 ⟶ 433:
|111 1010 ||style="background:lightblue;"| 172 ||style="background:#CCFFFF;"| 122 ||style="background:lightblue;"| 7A || [[z]]
|-
|111 1011 ||style="background:lightblue;"| 173 ||style="background:#CCFFFF;"| 123 ||style="background:lightblue;"| 7B || [[
|-
|111 1100 ||style="background:lightblue;"| 174 ||style="background:#CCFFFF;"| 124 ||style="background:lightblue;"| 7C || [[Barra verticale||]]
|-
|111 1101 ||style="background:lightblue;"| 175 ||style="background:#CCFFFF;"| 125 ||style="background:lightblue;"| 7D || [[
|-
|111 1110 ||style="background:lightblue;"| 176 ||style="background:#CCFFFF;"| 126 ||style="background:lightblue;"| 7E || [[Tilde|~]]
Riga 458 ⟶ 444:
{{clear}}
==
{{Vedi anche|ASCII art}}
Esiste anche un tipo di arte, chiamata [[ASCII art]], che consiste nel creare immagini con i [[Carattere (informatica)|caratteri]] dell'[[alfabeto]] ottenendo una grossolana scala di grigi sfruttando il riempimento del carattere.
▲*L'[[asteroide]] [[3568 ASCII]] prende il nome da questa codifica dei caratteri.
[[File:BB-ASCII-art-screenshot-zebra.png|thumb|upright=1.3|Ecco un esempio di "ASCII art".]]
== Note ==
<references/>
== Bibliografia ==
* {{IETF|20|ASCII format for Network Interchange}}
* {{cita libro|autore=David Salomon|titolo=Data Compression: The Complete Reference|capitolo=The ASCII Code|edizione=1|editore=Springer|città=New York|anno=1998|lingua=en|doi=10.1007/978-1-4757-2939-9|ISBN=978-1-4757-2939-9|pp=301-303}}
== Voci correlate ==
Riga 472 ⟶ 463:
== Altri progetti ==
{{interprogetto|
== Collegamenti esterni ==
* {{Collegamenti esterni}}
* {{FOLDOC|American Standard Code for Information Interchange|American Standard Code for Information Interchange}}
* {{cita web|url=http://www.wps.com/projects/codes/X3.4-1963/index.html|titolo=ASA standard X3.4-1963|lingua=en|accesso=3 novembre 2013|urlarchivio=https://web.archive.org/web/20120724022406/http://www.wps.com/projects/codes/X3.4-1963/index.html|urlmorto=sì}}
{{Controllo di autorità}}
{{portale|informatica}}
[[Categoria:Repertori di caratteri]]
[[Categoria:ASCII| ]]
|