| 423 | | ;; Support for the Windows 12xx series of codepages that MS has |
|---|
| 424 | | ;; butchered from the ISO-8859 specs. This does not add support for |
|---|
| 425 | | ;; the extended characters that MS has added in the 128 - 159 coding |
|---|
| 426 | | ;; range, only translates those characters that can be expressed in |
|---|
| 427 | | ;; the corresponding iso-8859 codepage. |
|---|
| 428 | | |
|---|
| 429 | | ;; Codepage Mapping: |
|---|
| 430 | | ;; |
|---|
| 431 | | ;; Windows-1250: ISO-8859-2 (Central Europe) - differs in some positions |
|---|
| 432 | | ;; Windows-1251: ISO-8859-5 (Cyrillic) - differs wildly |
|---|
| 433 | | ;; Windows-1252: ISO-8859-1 (West Europe) - exact match |
|---|
| 434 | | ;; Windows-1253: ISO-8859-7 (Greek) - differs in some positions |
|---|
| 435 | | ;; Windows-1254: ISO-8859-9 (Turkish) - exact match |
|---|
| 436 | | ;; Windows-1255: ISO-8859-8 (Hebrew) - exact match |
|---|
| 437 | | ;; Windows-1256: ISO-8859-6 (Arabic) - half match |
|---|
| 438 | | ;; Windows-1257: ISO-8859-4 (Baltic) - differs, future Latin-7 |
|---|
| 439 | | ;; Windows-1258: VISCII (Vietnamese) - Completely different |
|---|
| 440 | | |
|---|
| 441 | | (defvar cp1250-decode-table |
|---|
| 442 | | [ |
|---|
| 443 | | 160 165 162 163 164 188 140 167 168 138 170 141 143 173 142 175 |
|---|
| 444 | | 176 185 178 179 180 190 156 161 184 154 186 157 159 189 158 191 |
|---|
| 445 | | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|---|
| 446 | | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|---|
| 447 | | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
|---|
| 448 | | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 ] |
|---|
| 449 | | "ISO-8859-2 to Windows-1250 (Central Europe) codepage decoding table") |
|---|
| 450 | | (setplist 'cp1250-decode-table |
|---|
| 451 | | '(charset latin-iso8859-2 language "Latin-2" offset 160)) |
|---|
| 452 | | |
|---|
| 453 | | (defvar cp1251-decode-table |
|---|
| 454 | | [ |
|---|
| 455 | | 160 168 128 129 170 189 178 175 163 138 140 142 141 173 161 143 |
|---|
| 456 | | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|---|
| 457 | | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|---|
| 458 | | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
|---|
| 459 | | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|---|
| 460 | | 185 184 144 131 186 190 179 191 188 154 156 158 157 167 162 159 ] |
|---|
| 461 | | "ISO-8859-5 to Windows-1251 (Cyrillic) codepage decoding table") |
|---|
| 462 | | (setplist 'cp1251-decode-table |
|---|
| 463 | | '(charset cyrillic-iso8859-5 language "Cyrillic-ISO" offset 160)) |
|---|
| 464 | | |
|---|
| 465 | | ;; cp1253 is missing nbsp so we cannot quite translate perfectly. It |
|---|
| 466 | | ;; also has two micro/mu characters which would require more complex |
|---|
| 467 | | ;; processing to accomodate. |
|---|
| 468 | | (defvar cp1253-decode-table |
|---|
| 469 | | [ |
|---|
| 470 | | nil 145 146 163 nil nil 166 167 168 169 nil 171 172 173 nil 151 |
|---|
| 471 | | 176 177 178 179 180 161 162 183 184 185 186 187 188 189 190 191 |
|---|
| 472 | | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|---|
| 473 | | 208 209 nil 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|---|
| 474 | | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
|---|
| 475 | | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 nil ] |
|---|
| 476 | | "ISO-8859-7 to Windows-1253 (Greek) codepage decoding table") |
|---|
| 477 | | (setplist 'cp1253-decode-table |
|---|
| 478 | | '(charset greek-iso8859-7 language "Greek" offset 160)) |
|---|
| 479 | | |
|---|
| 480 | | ;; Since Latin-7 is not yet official, and Emacs does not support it, |
|---|
| 481 | | ;; provide translation between Windows-1257 and Latin-4 the best we |
|---|
| 482 | | ;; can. |
|---|
| 483 | | (defvar cp1257-decode-table |
|---|
| 484 | | [ |
|---|
| 485 | | 160 192 nil 170 164 nil 207 167 nil 208 199 204 nil 173 222 nil |
|---|
| 486 | | 176 224 nil 186 nil nil 239 nil nil 240 231 236 nil nil 254 nil |
|---|
| 487 | | 194 nil nil nil 196 197 175 193 200 201 198 nil 203 nil nil 206 |
|---|
| 488 | | nil 210 212 205 nil 213 214 215 168 216 nil nil 220 nil 219 223 |
|---|
| 489 | | 226 nil nil nil 228 229 191 225 232 233 230 nil 235 nil nil 238 |
|---|
| 490 | | nil 242 244 237 nil 245 246 247 184 248 nil nil 252 nil 251 nil ] |
|---|
| 491 | | "ISO-8859-4 to Windows-1257 (Baltic) codepage decoding table") |
|---|
| 492 | | (setplist 'cp1257-decode-table |
|---|
| 493 | | '(charset latin-iso8859-4 language "Latin-4" offset 160)) |
|---|
| 494 | | |
|---|