23.07.2013 Views

Java IO.pdf - Nguyen Dang Binh

Java IO.pdf - Nguyen Dang Binh

Java IO.pdf - Nguyen Dang Binh

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Java</strong> I/O<br />

ASCII value is the ASCII value of the character you want plus 64 (or 96, if you count from<br />

the capitals). Character 127, delete, is also a control character.<br />

The common abbreviation for the character is given first, followed by its common meaning.<br />

Some of these codes are pretty much obsolete. For instance, I'm not aware of any modern OS<br />

that actually uses characters 28 through 31 as file, group, record, and unit separators. Those<br />

control codes that are still used often have different meanings on different platforms. For<br />

example, character 10, the linefeed, originally meant move the platen on the printer up one<br />

line, while character 13, the carriage return, meant return the print-head to the beginning of<br />

the line. On paper-based teletype terminals, this could be used to position the print-head<br />

anywhere on a page and perhaps overtype characters that had already been typed. This no<br />

longer makes sense in an era of glass terminals and GUIs, so linefeed has come to mean a<br />

generic end-of-line character.<br />

The next 128 Unicode characters—that is 128 through 255—have the same values as the<br />

equivalent characters in the Latin-1 character set defined in ISO standard 8859-1. Latin-1, a<br />

slight variation of which is used by Windows, adds the various accented characters, umlauts,<br />

cedillas, upside-down question marks, and other characters needed to write text in most<br />

Western European languages. Table B.2 shows these characters. The first 128 characters in<br />

Latin-1 are the ASCII characters shown in Table B.1.<br />

Table B.2. Unicode Characters Between 128 and 255, Also the Second Half of the ISO 8859-1<br />

Latin-1 Character Set<br />

Code Character Code Character Code Character Code Character<br />

128 pad (padding character) 160 non-breaking space 192 À 224 à<br />

129 hop (high octet preset) 161 ¡ 193 Á 225 á<br />

130 bph (break permitted here) 162 ¢ 194 Â 226 â<br />

131 nbh (no break here) 163 £ 195 Ã 227 ã<br />

132 ind (index) 164 196 Ä 228 ä<br />

133 nel (next line) 165 ¥ 197 Å 229 å<br />

134 ssa (start of selected area) 166 | 198 Æ 230 æ<br />

135 esa (end of selected area) 167 § 199 Ç 231 ç<br />

136 hts (character tabulation set) 168 200 È 232 è<br />

137<br />

htj (character<br />

justification)<br />

tabulation with<br />

169 © 201 É 233 é<br />

138 vts (line tabulation set) 170 ª 202 Ê 234 ê<br />

139 pld (partial line forward) 171 « 203 Ë 235 ë<br />

140 plu (partial line backward) 172 ¬ 204 Ì 236 ì<br />

141 ri (reverse line feed) 173<br />

soft<br />

hyphen<br />

(optional)<br />

205 Í 237 í<br />

142 ss2 (single-shift two) 174 ® 206 Î 238 î<br />

143 ss3 (single-shift three) 175 ¯ 207 Ï 239 ï<br />

144 dcs (device control string) 176 (degree) 208 Ð 240 ð<br />

145 pu1 (private use one) 177 ± 209 Ñ 241 ñ<br />

146 pu2 (private use two) 178<br />

2<br />

210 Ò 242 ò<br />

147 sts (set transmit state) 179<br />

3<br />

211 Ó 243 ó<br />

148 cch (cancel character) 180 ´ 212 Ô 244 ô<br />

149 mw (message waiting ) 181 213 Õ 245 õ<br />

150 spa (start of guarded area) 182 214 Ö 246 ö<br />

466

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

Saved successfully!

Ooh no, something went wrong!