11.07.2015 Views

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

characters <strong>and</strong> strings 81<strong>of</strong> an HTML document. The script can perform additionalfunctions such as logging the user’s query for marketingpurposes.The complexity <strong>of</strong> Web features <strong>and</strong> the heavy load onservers have prompted a number <strong>of</strong> strategies for servingdynamic content more efficiently. Traditionally, each timea CGI request is passed to the URL for a script, the appropriatelanguage interpreter must be loaded <strong>and</strong> initialized.However, modern Web servers such as Apache have built-inmodules for commonly used scripting languages such asPHP, Perl, Python, <strong>and</strong> Ruby. This allows the Web serverto run the script directly without the overhead <strong>of</strong> starting anew interpreter process.A more fundamental shift in implementation is thedevelopment <strong>of</strong> methods to tie together DHTML <strong>and</strong> XMLwith a document model <strong>and</strong> scripting languages to allowfor dynamic changes in page content without having toreload the page (see Ajax).Note: the acronym CGI can also st<strong>and</strong> for “computergeneratedimagery” (see computer graphics).Further Reading“A Guide to HTML <strong>and</strong> CGI Scripts.” Available online. URL: http://snowwhite.it.brighton.ac.uk/~mas/mas/courses/html/html.html. Accessed May 30, 2007.Hamilton, Jacqueline D. CGI Programming 101. Houston, Tex.:CGI101.com, 2000. (First six chapters are available freeonline at URL: http://www.cgi101.com/book/.) AccessedAugust 12, 2007.“The Most Simple Intro to CGI.” Available online. URL: http://bignosebird.com/prcgi.shtml. Accessed August 12, 2007.characters <strong>and</strong> stringsWhile the attention <strong>of</strong> the first computer designers focusedmainly on numeric calculations, it was clear that much <strong>of</strong>the data that business people <strong>and</strong> others would want tomanipulate with the new machines would be textual innature. Billing records, for example, would have to includecustomer names <strong>and</strong> addresses, not just balance totals.The “natural” representation <strong>of</strong> data in a computer is asa series <strong>of</strong> two-state (binary) values, interpreted as binarynumbers. The solution for representing text (letters <strong>of</strong> thealphabet, punctuation marks, <strong>and</strong> other special symbols) isto assign a numeric value to each text symbol. The result isa character code, such as ASCII (American St<strong>and</strong>ard Codefor Information Interchange), which is the scheme usedmost widely today. (Another system, EBCDIC (ExtendedBinary-Coded Decimal Interchange Code) was used duringthe heyday <strong>of</strong> IBM mainframes, but is seldom used today.)The seven-bit ASCII system is compact (using one byte<strong>of</strong> memory to store each character), <strong>and</strong> was quite suitablefor early microcomputers that required only the basicEnglish alphabet, punctuation, <strong>and</strong> a few control characters(such as carriage return). In an attempt to use charactersto provide simple graphics capabilities, an “extendedASCII” was developed for use on IBM-compatible PCs.This used eight bits, increasing the number <strong>of</strong> charactersavailable from 128 to 256. However, the use <strong>of</strong> bitmappedgraphics in Windows <strong>and</strong> other operating systemsmade this version <strong>of</strong> ASCII unnecessary. Instead, the ANSI(American National St<strong>and</strong>ards Institute) eight-bit characterset used the additional character positions to store avariety <strong>of</strong> special symbols (such as fractions <strong>and</strong> the copyrightsymbol) <strong>and</strong> various accent marks used in Europeanlanguages.Table <strong>of</strong> 7-Bit ASCII Character CodesThe following are control (nonprinting) characters:0 Null (nothing)7 Bell (rings on an old teletype; beeps on most PCs)8 Backspace9 Tab10 Line feed (goes to next line without changing columnposition)13 Carriage return (positions to beginning <strong>of</strong> next line)26 End <strong>of</strong> file27 [Esc] (Escape key)The characters with codes from 32 to 127 produce printablecharacters.32 [space] 64 @ 96 `33 ! 65 A 97 a34 “ 66 B 98 b35 # 67 C 99 c36 $ 68 D 100 d37 % 69 E 101 e38 & 70 F 102 f39 ‘ 71 G 103 g40 ( 72 H 104 h41 ) 73 I 105 i42 * 74 J 106 j43 + 75 K 107 k44 ‘ 76 L 108 l45 - 77 M 109 m46 . 78 N 110 n47 / 79 O 111 o48 0 80 P 112 p49 1 81 Q 113 q50 2 82 R 114 r51 3 83 S 115 s52 4 84 T 116 t53 5 85 U 117 u54 6 86 V 118 v55 7 87 W 119 w56 8 88 X 120 x57 9 89 Y 121 y58 : 90 Z 122 z59 ; 91 [ 123 {60 < 92 \ 124 |61 = 93 ] 125 }62 > 94 ^ 126 ~63 ? 95 - 127 [delete]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!