Utente:Conky77/Sandbox

Da Wikipedia, l'enciclopedia libera.
Vai alla navigazione Vai alla ricerca
"Wikipedia" in Code 39

Code 39 (o Code 3 of 9) è un codice a barre che permette di rappresentare 43 caratteri, ovvero le lettere maiuscole (26 lettere da A a Z), i caratteri numerici (da 0 a 9) e alcuni caratteri speciali (-, ., $, /, +, %, e lo spazio) e un carattere speciale ( '*' ) usato come delimitatore di inizio e fine. Ogni carattere è costituito da 9 elementi: 5 barre e 4 spazi. Il nome trae origine dal fatto che ciascun carattere è composto da 9 barre verticali di cui 3 sono larghe (simbolo binario 1) mentre le restanti 6 sono strette (simbolo binario 0).

Codifica[modifica | modifica wikitesto]

Il carattere * presentata di seguito non è un vero e proprio carattere codificabile, ma è il carattere di start e di stop per il Code 39. L'asimmetria del simbolo permette al lettore barcode di determinare la direzione del codice a barre da acquisire. Questo codice è tradizionalmente associato al carattere * nei font di barcode e spesso appare con la rappresentazione leggibile a fianco del codice a barre.

Tabella dei caratteri del code 39

Come una generalità, la posizione delle due barre larghe può essere considerato per codificare un numero compreso tra 1 e 10, e la posizione dello spazio ampio (che ha quattro possibili posizioni) può essere considerato per classificare il personaggio in uno dei quattro gruppi ( da sinistra a destra): Letters (+30) (U-Z), cifre (0) (1-9,0), lettere (+10) (a-J), e lettere (+20) (K- T). Ad esempio, la lettera P (essendo 16 lettera dell'alfabeto) ha le barre allineate per rappresentare il numero 6, e lo spazio nella posizione all'estrema destra per selezionare le lettere del gruppo (+20).

As a generality, the location of the two wide bars can be considered to encode a number between 1 and 10, and the location of the wide space (which has four possible positions) can be considered to classify the character into one of four groups (from left to right): Letters(+30) (U–Z), Digits(+0) (1–9,0), Letters(+10) (A–J), and Letters(+20) (K–T). For example, the letter P (being the 16th letter of the alphabet) has its bars aligned to represent the number 6, and the space in the far right position to select the group Letters(+20).

Quando rappresentato come cifra, il numero "10" (4 + 7 => 11 sarà 10) viene utilizzato per codificare il numero zero. Perché ci sono solo sei lettere nelle Lettere (+30) di gruppo (lettere 30-35, o U-Z), gli altri quattro posizioni in questo gruppo (36-39) sono utilizzati per rappresentare tre simboli (trattino, periodo, spazio ) e il carattere di inizio / arresto.

When represented as a digit, the number "10" (4+7=>11 will be 10) is used to encode the number zero. Because there are only six letters in the Letters(+30) group (letters 30–35, or U–Z), the other four positions in this group (36–39) are used to represent three symbols (dash, period, space) as well as the start/stop character.

The two wide bars, out of five possible positions, encode a number between 1 and 10 using a two-out-of-five code with the following numeric equivalence: 1, 2, 4, 7, P. The numbers are summed together. For example, the number 6 is encoded NWWNN, with wide bars occupying the positions for 2 and 4 (2+4=6). The P position stands for parity, and does not add anything to the sum; instead, it contains a wide bar only when encoding numbers that need a single bar (1, 2, 4, and 7), so as to ensure that exactly two of the five positions still contain a wide bar. In the case of NNWWN which is 4+7=>11 it will be assigned to 0 for digit (+0), and 10 for (+10 – +30). When encoding the (+10 to +30) Letters the equation needs a "−1" added so 'A' is WNNNW => 1 + 10 − 1 => 10 as shown in the table.

The last four characters consist of all narrow bars and three wide spaces. There are four possible positions for the single narrow space.

This table outlines the Code 39 specification. The numeric value assigned to each character (except start/stop) is used in the checksum algorithm described below.

Code 39 characters (and checksum values)
Bars Spaces
|| ||| +0 ||| || +10 |||| | +20 | |||| +30
▮| ||▮ 1 ▮| ||▮ 1 1 ▮|| |▮ A 10 ▮||| ▮ K 20 ▮ |||▮ U 30
|▮||▮ 2 |▮ ||▮ 2 2 |▮| |▮ B 11 |▮|| ▮ L 21 | ▮||▮ V 31
▮▮||| 3 ▮▮ ||| 3 3 ▮▮| || C 12 ▮▮|| | M 22 ▮ ▮||| W 32
||▮|▮ 4 || ▮|▮ 4 4 ||▮ |▮ D 13 ||▮| ▮ N 23 | |▮|▮ X 33
▮|▮|| 5 ▮| ▮|| 5 5 ▮|▮ || E 14 ▮|▮| | O 24 ▮ |▮|| Y 34
|▮▮|| 6 |▮ ▮|| 6 6 |▮▮ || F 15 |▮▮| | P 25 | ▮▮|| Z 35
|||▮▮ 7 || |▮▮ 7 7 ||| ▮▮ G 16 |||▮ ▮ Q 26 | ||▮▮ - 36
▮||▮| 8 ▮| |▮| 8 8 ▮|| ▮| H 17 ▮||▮ | R 27 ▮ ||▮| . 37
|▮|▮| 9 |▮ |▮| 9 9 |▮| ▮| I 18 |▮|▮ | S 28 | ▮|▮| 38
||▮▮| 10 || ▮▮| 0 0 ||▮ ▮| J 19 ||▮▮ | T 29 | |▮▮| *
||||| | || | | + 41 | | || | / 40 | | | || $ 39 || | | | % 42

Characters are separated by an additional narrow space. For example, the full encoding for the single letter "A", which actually includes the start and stop characters as "*A*", is Template:Nobreak. The code will not be read properly without these inter-character spaces. Barcode fonts invariably include this space within the glyph for the character.


Altri progetti[modifica | modifica wikitesto]

Collegamenti esterni[modifica | modifica wikitesto]

  Portale Informatica: accedi alle voci di Wikipedia che trattano di informatica

[[Categoria:Codici a barre]]