Changeset 7754
- Timestamp:
- Nov 26, 2007, 3:33:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-unicode.lisp
r7624 r7754 360 360 ;;; the break is at #x80 instead of #xa0). 361 361 362 (def parameter*iso-8859-2-to-unicode*362 (defstatic *iso-8859-2-to-unicode* 363 363 #( 364 364 ;; #xa0 … … 382 382 )) 383 383 384 (def parameter*unicode-00a0-0180-to-iso-8859-2*384 (defstatic *unicode-00a0-0180-to-iso-8859-2* 385 385 #( 386 386 #xa0 nil nil nil #xa4 nil nil #xa7 ; #xa0-#xa7 … … 415 415 )) 416 416 417 (def parameter*unicode-00c0-00e0-to-iso-8859-2*417 (defstatic *unicode-00c0-00e0-to-iso-8859-2* 418 418 #( 419 419 nil nil nil nil nil nil nil #xb7 ; #xc0-#xc7 … … 527 527 ) 528 528 529 (def parameter*iso-8859-3-to-unicode*529 (defstatic *iso-8859-3-to-unicode* 530 530 #( 531 531 ;; #xa0 … … 549 549 )) 550 550 551 (def parameter*unicode-a0-100-to-iso-8859-3*551 (defstatic *unicode-a0-100-to-iso-8859-3* 552 552 #( 553 553 #xa0 nil nil #xa3 #xa4 nil nil #xa7 ; #xa0-#xa7 … … 565 565 )) 566 566 567 (def parameter*unicode-108-180-to-iso-8859-3*567 (defstatic *unicode-108-180-to-iso-8859-3* 568 568 #( 569 569 #xc6 #xe6 #xc5 #xe5 #x00 #x00 #x00 #x00 ; #x108-#x10f … … 584 584 )) 585 585 586 (def parameter*unicode-2d8-2e0-to-iso-8859-3*586 (defstatic *unicode-2d8-2e0-to-iso-8859-3* 587 587 #( 588 588 #xa2 #xff nil nil nil nil nil nil ; #x2d8-#x2df … … 707 707 708 708 709 (def parameter*iso-8859-4-to-unicode*709 (defstatic *iso-8859-4-to-unicode* 710 710 #( 711 711 ;; #xa0 … … 730 730 731 731 732 (def parameter*unicode-a0-180-to-iso-8859-4*732 (defstatic *unicode-a0-180-to-iso-8859-4* 733 733 #( 734 734 #xa0 nil nil nil #xa4 nil nil #xa7 ; #xa0-#xa7 … … 762 762 )) 763 763 764 (def parameter*unicode-2c0-2e0-to-iso-8859-4*764 (defstatic *unicode-2c0-2e0-to-iso-8859-4* 765 765 #( 766 766 nil nil nil nil nil nil nil #xb7 ; #x2c0-#x2c7 … … 878 878 ) 879 879 880 (def parameter*iso-8859-5-to-unicode*880 (defstatic *iso-8859-5-to-unicode* 881 881 #( 882 882 ;; #xa0 … … 901 901 902 902 903 (def parameter*unicode-a0-b0-to-iso-8859-5*903 (defstatic *unicode-a0-b0-to-iso-8859-5* 904 904 #( 905 905 #xa0 nil nil nil nil nil nil #xfd ; #xa0-#xa7 … … 907 907 )) 908 908 909 (def parameter*unicode-400-460-to-iso-8859-5*909 (defstatic *unicode-400-460-to-iso-8859-5* 910 910 #( 911 911 nil #xa1 #xa2 #xa3 #xa4 #xa5 #xa6 #xa7 ; #x400-#x407 … … 1030 1030 ) 1031 1031 1032 (def parameter*iso-8859-6-to-unicode*1032 (defstatic *iso-8859-6-to-unicode* 1033 1033 #( 1034 1034 ;; #xa0 … … 1052 1052 )) 1053 1053 1054 (def parameter*unicode-a0-b0-to-iso-8859-6*1054 (defstatic *unicode-a0-b0-to-iso-8859-6* 1055 1055 #( 1056 1056 0xa0 nil nil nil 0xa4 nil nil nil ; #xa0-#xa7 … … 1059 1059 1060 1060 1061 (def parameter*unicode-608-658-to-iso-8859-6*1061 (defstatic *unicode-608-658-to-iso-8859-6* 1062 1062 #( 1063 1063 nil nil nil nil #xac nil nil nil ; #x608-#x60f … … 1179 1179 ) 1180 1180 1181 (def parameter*iso-8859-7-to-unicode*1181 (defstatic *iso-8859-7-to-unicode* 1182 1182 #( 1183 1183 ;; #xa0 … … 1201 1201 )) 1202 1202 1203 (def parameter*unicode-a0-c0-to-iso-8859-7*1203 (defstatic *unicode-a0-c0-to-iso-8859-7* 1204 1204 #( 1205 1205 #xa0 nil nil #xa3 nil nil #xa6 #xa7 ; #xa0-#xa7 … … 1209 1209 )) 1210 1210 1211 (def parameter*unicode-378-3d0-to-iso-8859-7*1211 (defstatic *unicode-378-3d0-to-iso-8859-7* 1212 1212 #( 1213 1213 nil nil #xaa nil nil nil nil nil ; #x378-#x37f … … 1224 1224 )) 1225 1225 1226 (def parameter*unicode-2010-2020-to-iso-8859-7*1226 (defstatic *unicode-2010-2020-to-iso-8859-7* 1227 1227 #( 1228 1228 nil nil nil nil nil #xaf nil nil ; #x2010-#x2017 … … 1230 1230 )) 1231 1231 1232 (def parameter*unicode-20ac-20b0-to-iso-8859-7*1232 (defstatic *unicode-20ac-20b0-to-iso-8859-7* 1233 1233 #( 1234 1234 #xa4 nil nil #xa5 … … 1359 1359 ) 1360 1360 1361 (def parameter*iso-8859-8-to-unicode*1361 (defstatic *iso-8859-8-to-unicode* 1362 1362 #( 1363 1363 ;; #xa0 … … 1381 1381 )) 1382 1382 1383 (def parameter*unicode-a0-f8-to-iso-8859-8*1383 (defstatic *unicode-a0-f8-to-iso-8859-8* 1384 1384 #( 1385 1385 #xa0 nil #xa2 #xa3 #xa4 #xa5 #xa6 #xa7 ; #xa0-#xa7 … … 1396 1396 )) 1397 1397 1398 (def parameter*unicode-5d0-5f0-to-iso-8859-8*1398 (defstatic *unicode-5d0-5f0-to-iso-8859-8* 1399 1399 #( 1400 1400 #xe0 #xe1 #xe2 #xe3 #xe4 #xe5 #xe6 #xe7 ; #x5d0-#x5d7 … … 1404 1404 )) 1405 1405 1406 (def parameter*unicode-2008-2018-to-iso-8859-8*1406 (defstatic *unicode-2008-2018-to-iso-8859-8* 1407 1407 #( 1408 1408 nil nil nil nil nil nil #xfd #xfe ; #x2008-#x200f … … 1525 1525 ) 1526 1526 1527 (def parameter*iso-8859-9-to-unicode*1527 (defstatic *iso-8859-9-to-unicode* 1528 1528 #( 1529 1529 ;; #xd0 … … 1538 1538 )) 1539 1539 1540 (def parameter*unicode-d0-100-to-iso-8859-9*1540 (defstatic *unicode-d0-100-to-iso-8859-9* 1541 1541 #( 1542 1542 nil #xd1 #xd2 #xd3 #xd4 #xd5 #xd6 #xd7 ; #xd0-#xd7 … … 1548 1548 )) 1549 1549 1550 (def parameter*unicode-118-160-to-iso-8859-9*1550 (defstatic *unicode-118-160-to-iso-8859-9* 1551 1551 #( 1552 1552 nil nil nil nil nil nil #xd0 #xf0 ; #x118-#x11f … … 1668 1668 ) 1669 1669 1670 (def parameter*iso-8859-10-to-unicode*1670 (defstatic *iso-8859-10-to-unicode* 1671 1671 #( 1672 1672 ;; #xa0 … … 1690 1690 )) 1691 1691 1692 (def parameter*unicode-a0-180-to-iso-8859-10*1692 (defstatic *unicode-a0-180-to-iso-8859-10* 1693 1693 #( 1694 1694 #xa0 nil nil nil nil nil nil #xa7 ; #xa0-#xa7 … … 1930 1930 ;;; There is no iso-8859-12 encoding. 1931 1931 1932 (def parameter*iso-8859-13-to-unicode*1932 (defstatic *iso-8859-13-to-unicode* 1933 1933 #( 1934 1934 ;; #xa0 … … 1952 1952 )) 1953 1953 1954 (def parameter*unicode-a0-180-to-iso-8859-13*1954 (defstatic *unicode-a0-180-to-iso-8859-13* 1955 1955 #( 1956 1956 #xa0 nil #xa2 #xa3 #xa4 nil #xa6 #xa7 ; #xa0-#xa7 … … 1984 1984 )) 1985 1985 1986 (def parameter*unicode-2018-2020-to-iso-8859-13*1986 (defstatic *unicode-2018-2020-to-iso-8859-13* 1987 1987 #( 1988 1988 nil #xff nil nil #xb4 #xa1 #xa5 nil ; #x2018-#x201f */ … … 2098 2098 ) 2099 2099 2100 (def parameter*iso-8859-14-to-unicode*2100 (defstatic *iso-8859-14-to-unicode* 2101 2101 #( 2102 2102 ;; #xa0 … … 2120 2120 )) 2121 2121 2122 (def parameter*unicode-a0-100-to-iso-8859-14*2122 (defstatic *unicode-a0-100-to-iso-8859-14* 2123 2123 #( 2124 2124 #xa0 nil nil #xa3 nil nil nil #xa7 ; #xa0-#xa7 … … 2136 2136 )) 2137 2137 2138 (def parameter*unicode-108-128-to-iso-8859-14*2138 (defstatic *unicode-108-128-to-iso-8859-14* 2139 2139 #( 2140 2140 nil nil #xa4 #xa5 nil nil nil nil ; #x108-#x10f … … 2144 2144 )) 2145 2145 2146 (def parameter*unicode-170-180-to-iso-8859-14*2146 (defstatic *unicode-170-180-to-iso-8859-14* 2147 2147 #( 2148 2148 nil nil nil nil #xd0 #xf0 #xde #xfe ; #x170-#x177 … … 2150 2150 )) 2151 2151 2152 (def parameter*unicode-1e00-1e88-to-iso-8859-14*2152 (defstatic *unicode-1e00-1e88-to-iso-8859-14* 2153 2153 #( 2154 2154 nil nil #xa1 #xa2 nil nil nil nil ; #x1e00-#x1e07 … … 2171 2171 )) 2172 2172 2173 (def parameter*unicode-1ef0-1ef8-to-iso-8859-14*2173 (defstatic *unicode-1ef0-1ef8-to-iso-8859-14* 2174 2174 #( 2175 2175 nil nil #xac #xbc nil nil nil nil ; #x1ef0-#x1ef7 … … 2307 2307 ) 2308 2308 2309 (def parameter*iso-8859-15-to-unicode*2309 (defstatic *iso-8859-15-to-unicode* 2310 2310 #( 2311 2311 ;; #xa0 … … 2333 2333 )) 2334 2334 2335 (def parameter*unicode-a0-100-to-iso-8859-15*2335 (defstatic *unicode-a0-100-to-iso-8859-15* 2336 2336 #( 2337 2337 #xa0 #xa1 #xa2 #xa3 nil #xa5 nil #xa7 ; #xa0-#xa7 … … 2349 2349 )) 2350 2350 2351 (def parameter*unicode-150-180-to-iso-8859-15*2351 (defstatic *unicode-150-180-to-iso-8859-15* 2352 2352 #( 2353 2353 nil nil #xbc #xbd nil nil nil nil ; #x150-#x157 … … 2467 2467 ) 2468 2468 2469 (def parameter*iso-8859-16-to-unicode*2469 (defstatic *iso-8859-16-to-unicode* 2470 2470 #( 2471 2471 ;; #xa0 … … 2489 2489 )) 2490 2490 2491 (def parameter*unicode-a0-180-to-iso-8859-16*2491 (defstatic *unicode-a0-180-to-iso-8859-16* 2492 2492 #( 2493 2493 #xa0 nil nil nil nil nil nil #xa7 ; #xa0-#xa7 … … 2521 2521 )) 2522 2522 2523 (def parameter*unicode-218-220-to-iso-8859-16*2523 (defstatic *unicode-218-220-to-iso-8859-16* 2524 2524 #( 2525 2525 #xaa #xba #xde #xfe nil nil nil nil ; #x218-#x21f 2526 2526 )) 2527 2527 2528 (def parameter*unicode-2018-2020-to-iso-8859-16*2528 (defstatic *unicode-2018-2020-to-iso-8859-16* 2529 2529 #( 2530 2530 nil nil nil nil nil #xb5 #xa5 nil ; #x2018-#x201f … … 2648 2648 ) 2649 2649 2650 (defstatic *macintosh-to-unicode* 2651 #( 2652 ;; #x80 2653 #\u+00c4 #\u+00c5 #\u+00c7 #\u+00c9 #\u+00d1 #\u+00d6 #\u+00dc #\u+00e1 2654 #\u+00e0 #\u+00e2 #\u+00e4 #\u+00e3 #\u+00e5 #\u+00e7 #\u+00e9 #\u+00e8 2655 ;; #x90 2656 #\u+00ea #\u+00eb #\u+00ed #\u+00ec #\u+00ee #\u+00ef #\u+00f1 #\u+00f3 2657 #\u+00f2 #\u+00f4 #\u+00f6 #\u+00f5 #\u+00fa #\u+00f9 #\u+00fb #\u+00fc 2658 ;; #xa0 2659 #\u+2020 #\u+00b0 #\u+00a2 #\u+00a3 #\u+00a7 #\u+2022 #\u+00b6 #\u+00df 2660 #\u+00ae #\u+00a9 #\u+2122 #\u+00b4 #\u+00a8 #\u+2260 #\u+00c6 #\u+00d8 2661 ;; #xb0 2662 #\u+221e #\u+00b1 #\u+2264 #\u+2265 #\u+00a5 #\u+00b5 #\u+2202 #\u+2211 2663 #\u+220f #\u+03c0 #\u+222b #\u+00aa #\u+00ba #\u+2126 #\u+00e6 #\u+00f8 2664 ;; #xc0 2665 #\u+00bf #\u+00a1 #\u+00ac #\u+221a #\u+0192 #\u+2248 #\u+2206 #\u+00ab 2666 #\u+00bb #\u+2026 #\u+00a0 #\u+00c0 #\u+00c3 #\u+00d5 #\u+0152 #\u+0153 2667 ;; #xd0 2668 #\u+2013 #\u+2014 #\u+201c #\u+201d #\u+2018 #\u+2019 #\u+00f7 #\u+25ca 2669 #\u+00ff #\u+0178 #\u+2044 #\u+00a4 #\u+2039 #\u+203a #\u+fb01 #\u+fb02 2670 ;; #xe0 2671 #\u+2021 #\u+00b7 #\u+201a #\u+201e #\u+2030 #\u+00c2 #\u+00ca #\u+00c1 2672 #\u+00cb #\u+00c8 #\u+00cd #\u+00ce #\u+00cf #\u+00cc #\u+00d3 #\u+00d4 2673 ;; #xf0 2674 #\u+f8ff #\u+00d2 #\u+00da #\u+00db #\u+00d9 #\u+0131 #\u+02c6 #\u+02dc 2675 #\u+00af #\u+02d8 #\u+02d9 #\u+02da #\u+00b8 #\u+02dd #\u+02db #\u+02c7 2676 )) 2677 2678 2679 (defstatic *unicode-a0-100-to-macintosh* 2680 #( 2681 #xca #xc1 #xa2 #xa3 #xdb #xb4 nil #xa4 ; #xa0-#xa7 2682 #xac #xa9 #xbb #xc7 #xc2 nil #xa8 #xf8 ; #xa8-#xaf 2683 #xa1 #xb1 nil nil #xab #xb5 #xa6 #xe1 ; #xb0-#xb7 2684 #xfc nil #xbc #xc8 nil nil nil #xc0 ; #xb8-#xbf 2685 #xcb #xe7 #xe5 #xcc #x80 #x81 #xae #x82 ; #xc0-#xc7 2686 #xe9 #x83 #xe6 #xe8 #xed #xea #xeb #xec ; #xc8-#xcf 2687 nil #x84 #xf1 #xee #xef #xcd #x85 nil ; #xd0-#xd7 2688 #xaf #xf4 #xf2 #xf3 #x86 nil nil #xa7 ; #xd8-#xdf 2689 #x88 #x87 #x89 #x8b #x8a #x8c #xbe #x8d ; #xe0-#xe7 2690 #x8f #x8e #x90 #x91 #x93 #x92 #x94 #x95 ; #xe8-#xef 2691 nil #x96 #x98 #x97 #x99 #x9b #x9a #xd6 ; #xf0-#xf7 2692 #xbf #x9d #x9c #x9e #x9f nil nil #xd8 ; #xf8-#xff 2693 )) 2694 2695 (defstatic *unicode-130-198-to-macintosh* 2696 #( 2697 nil #xf5 nil nil nil nil nil nil ; #x130-#x137 2698 nil nil nil nil nil nil nil nil ; #x138-#x13f 2699 nil nil nil nil nil nil nil nil ; #x140-#x147 2700 nil nil nil nil nil nil nil nil ; #x148-#x14f 2701 nil nil #xce #xcf nil nil nil nil ; #x150-#x157 2702 nil nil nil nil nil nil nil nil ; #x158-#x15f 2703 nil nil nil nil nil nil nil nil ; #x160-#x167 2704 nil nil nil nil nil nil nil nil ; #x168-#x16f 2705 nil nil nil nil nil nil nil nil ; #x170-#x177 2706 #xd9 nil nil nil nil nil nil nil ; #x178-#x17f 2707 nil nil nil nil nil nil nil nil ; #x180-#x187 2708 nil nil nil nil nil nil nil nil ; #x188-#x18f 2709 nil nil #xc4 nil nil nil nil nil ; #x190-#x197 2710 )) 2711 2712 (defstatic *unicode-2c0-2e0-to-macintosh* 2713 #( 2714 nil nil nil nil nil nil #xf6 #xff ; #x2c0-#x2c7 2715 nil nil nil nil nil nil nil nil ; #x2c8-#x2cf 2716 nil nil nil nil nil nil nil nil ; #x2d0-#x2d7 2717 #xf9 #xfa #xfb #xfe #xf7 #xfd nil nil ; #x2d8-#x2df 2718 )) 2719 2720 (defstatic *unicode-2010-2048-to-macintosh* 2721 #( 2722 nil nil nil #xd0 #xd1 nil nil nil ; #x2010-#x2017 2723 #xd4 #xd5 #xe2 nil #xd2 #xd3 #xe3 nil ; #x2018-#x201f 2724 #xa0 #xe0 #xa5 nil nil nil #xc9 nil ; #x2020-#x2027 2725 nil nil nil nil nil nil nil nil ; #x2028-#x202f 2726 #xe4 nil nil nil nil nil nil nil ; #x2030-#x2037 2727 nil #xdc #xdd nil nil nil nil nil ; #x2038-#x203f 2728 nil nil nil nil #xda nil nil nil ; #x2040-#x2047 2729 )) 2730 2731 (defstatic *unicode-2120-2128-to-macintosh* 2732 #( 2733 nil nil #xaa nil nil nil #xbd nil ; #x2120-#x2127 2734 )) 2735 2736 (defstatic *unicode-2200-2268-to-macintosh* 2737 #( 2738 nil nil #xb6 nil nil nil #xc6 nil ; #x2200-#x2207 2739 nil nil nil nil nil nil nil #xb8 ; #x2208-#x220f 2740 nil #xb7 nil nil nil nil nil nil ; #x2210-#x2217 2741 nil nil #xc3 nil nil nil #xb0 nil ; #x2218-#x221f 2742 nil nil nil nil nil nil nil nil ; #x2220-#x2227 2743 nil nil nil #xba nil nil nil nil ; #x2228-#x222f 2744 nil nil nil nil nil nil nil nil ; #x2230-#x2237 2745 nil nil nil nil nil nil nil nil ; #x2238-#x223f 2746 nil nil nil nil nil nil nil nil ; #x2240-#x2247 2747 #xc5 nil nil nil nil nil nil nil ; #x2248-#x224f 2748 nil nil nil nil nil nil nil nil ; #x2250-#x2257 2749 nil nil nil nil nil nil nil nil ; #x2258-#x225f 2750 #xad nil nil nil #xb2 #xb3 nil nil ; #x2260-#x2267 2751 )) 2752 2753 (defstatic *unicode-fb00-fb08-to-macintosh* 2754 #( 2755 nil #xde #xdf nil nil nil nil nil ; #xfb00-#xfb07 2756 )) 2757 2758 (define-character-encoding :macintosh 2759 "An 8-bit, fixed-width character encoding in which codes #x00-#x7f 2760 map to their Unicode equivalents and other codes map to other Unicode 2761 character values. Traditionally used on Classic MacOS to encode characters 2762 used in western languages." 2763 :aliases '(:macos-roman :macosroman :mac-roman :macroman) 2764 2765 :stream-encode-function 2766 (nfunction 2767 macintosh-stream-encode 2768 (lambda (char write-function stream) 2769 (let* ((code (char-code char)) 2770 (c2 (cond ((< code #x80) code) 2771 ((and (>= code #xa0) (< code #x100) 2772 (svref *unicode-a0-100-to-macintosh* 2773 (the fixnum (- code #xa0))))) 2774 ((and (>= code #x130) (< code #x198)) 2775 (svref *unicode-130-198-to-macintosh* 2776 (the fixnum (- code #x130)))) 2777 ((and (>= code #x2c0) (< code #x2e0)) 2778 (svref *unicode-2c0-2e0-to-macintosh* 2779 (the fixnum (- code #x2c0)))) 2780 ((= code #x3c0) #xb9) 2781 ((and (>= code #x2010) (< code #x2048)) 2782 (svref *unicode-2010-2048-to-macintosh* 2783 (the fixnum (- code #x2010)))) 2784 ((and (>= code #x2120) (< code #x2128)) 2785 (svref *unicode-2120-2128-to-macintosh* 2786 (the fixnum (- code #x2120)))) 2787 ((and (>= code #x2200) (< code #x2268)) 2788 (svref *unicode-2200-2268-to-macintosh* 2789 (the fixnum (- code #x2200)))) 2790 ((= code #x25ca) #xd7) 2791 ((and (>= code #xfb00) (< code #xfb08)) 2792 (svref *unicode-fb00-fb08-to-macintosh* 2793 (the fixnum (- code #xfb00)))) 2794 ((= code #xf8ff) #xf0)))) 2795 (declare (type (mod #x110000) code)) 2796 (funcall write-function stream (or c2 (char-code #\Sub))) 2797 1))) 2798 :stream-decode-function 2799 (nfunction 2800 macintosh-stream-decode 2801 (lambda (1st-unit next-unit-function stream) 2802 (declare (ignore next-unit-function stream) 2803 (type (unsigned-byte 8) 1st-unit)) 2804 (if (< 1st-unit #x80) 2805 (code-char 1st-unit) 2806 (svref *macintosh-to-unicode* (the fixnum (- 1st-unit #x80)))))) 2807 :vector-encode-function 2808 (nfunction 2809 macintosh-vector-encode 2810 (lambda (string vector idx start end) 2811 (declare (type (simple-array (unsigned-byte 8) (*)) vector) 2812 (fixnum idx)) 2813 (do* ((i start (1+ i))) 2814 ((>= i end) idx) 2815 (let* ((char (schar string i)) 2816 (code (char-code char)) 2817 (c2 (cond ((< code #x80) code) 2818 ((and (>= code #xa0) (< code #x100) 2819 (svref *unicode-a0-100-to-macintosh* 2820 (the fixnum (- code #xa0))))) 2821 ((and (>= code #x130) (< code #x198)) 2822 (svref *unicode-130-198-to-macintosh* 2823 (the fixnum (- code #x130)))) 2824 ((and (>= code #x2c0) (< code #x2e0)) 2825 (svref *unicode-2c0-2e0-to-macintosh* 2826 (the fixnum (- code #x2c0)))) 2827 ((= code #x3c0) #xb9) 2828 ((and (>= code #x2010) (< code #x2048)) 2829 (svref *unicode-2010-2048-to-macintosh* 2830 (the fixnum (- code #x2010)))) 2831 ((and (>= code #x2120) (< code #x2128)) 2832 (svref *unicode-2120-2128-to-macintosh* 2833 (the fixnum (- code #x2120)))) 2834 ((and (>= code #x2200) (< code #x2268)) 2835 (svref *unicode-2200-2268-to-macintosh* 2836 (the fixnum (- code #x2200)))) 2837 ((= code #x25ca) #xd7) 2838 ((and (>= code #xfb00) (< code #xfb08)) 2839 (svref *unicode-fb00-fb08-to-macintosh* 2840 (the fixnum (- code #xfb00)))) 2841 ((= code #xf8ff) #xf0)))) 2842 (declare (type (mod #x110000) code)) 2843 (setf (aref vector idx) (or c2 (char-code #\Sub))) 2844 (incf idx))))) 2845 :vector-decode-function 2846 (nfunction 2847 macintosh-vector-decode 2848 (lambda (vector idx noctets string) 2849 (declare (type (simple-array (unsigned-byte 8) (*)) vector)) 2850 (do* ((i 0 (1+ i)) 2851 (index idx (1+ index))) 2852 ((>= i noctets) index) 2853 (let* ((1st-unit (aref vector index))) 2854 (declare (type (unsigned-byte 8) 1st-unit)) 2855 (setf (schar string i) 2856 (if (< 1st-unit #x80) 2857 (code-char 1st-unit) 2858 (svref *macintosh-to-unicode* (the fixnum (- 1st-unit #x80))))))))) 2859 :memory-encode-function 2860 (nfunction 2861 macintosh-memory-encode 2862 (lambda (string pointer idx start end) 2863 (do* ((i start (1+ i))) 2864 ((>= i end) idx) 2865 (let* ((code (char-code (schar string i))) 2866 (c2 (cond ((< code #x80) code) 2867 ((and (>= code #xa0) (< code #x100) 2868 (svref *unicode-a0-100-to-macintosh* 2869 (the fixnum (- code #xa0))))) 2870 ((and (>= code #x130) (< code #x198)) 2871 (svref *unicode-130-198-to-macintosh* 2872 (the fixnum (- code #x130)))) 2873 ((and (>= code #x2c0) (< code #x2e0)) 2874 (svref *unicode-2c0-2e0-to-macintosh* 2875 (the fixnum (- code #x2c0)))) 2876 ((= code #x3c0) #xb9) 2877 ((and (>= code #x2010) (< code #x2048)) 2878 (svref *unicode-2010-2048-to-macintosh* 2879 (the fixnum (- code #x2010)))) 2880 ((and (>= code #x2120) (< code #x2128)) 2881 (svref *unicode-2120-2128-to-macintosh* 2882 (the fixnum (- code #x2120)))) 2883 ((and (>= code #x2200) (< code #x2268)) 2884 (svref *unicode-2200-2268-to-macintosh* 2885 (the fixnum (- code #x2200)))) 2886 ((= code #x25ca) #xd7) 2887 ((and (>= code #xfb00) (< code #xfb08)) 2888 (svref *unicode-fb00-fb08-to-macintosh* 2889 (the fixnum (- code #xfb00)))) 2890 ((= code #xf8ff) #xf0)))) 2891 (declare (type (mod #x110000) code)) 2892 (setf (%get-unsigned-byte pointer idx) (or c2 (char-code #\Sub))) 2893 (incf idx))))) 2894 :memory-decode-function 2895 (nfunction 2896 macintosh--memory-decode 2897 (lambda (pointer noctets idx string) 2898 (do* ((i 0 (1+ i)) 2899 (index idx (1+ index))) 2900 ((>= i noctets) index) 2901 (let* ((1st-unit (%get-unsigned-byte pointer index))) 2902 (declare (type (unsigned-byte 8) 1st-unit)) 2903 (setf (schar string i) 2904 (if (< 1st-unit #x80) 2905 (code-char 1st-unit) 2906 (svref *macintosh-to-unicode* (the fixnum (- 1st-unit #xa0))))))))) 2907 :octets-in-string-function 2908 #'8-bit-fixed-width-octets-in-string 2909 :length-of-vector-encoding-function 2910 #'8-bit-fixed-width-length-of-vector-encoding 2911 :length-of-memory-encoding-function 2912 #'8-bit-fixed-width-length-of-memory-encoding 2913 :decode-literal-code-unit-limit #x80 2914 :encode-literal-char-code-limit #x80 2915 ) 2650 2916 2651 2917 ;;; UTF-8. Decoding checks for malformed sequences; it might be faster (and
Note:
See TracChangeset
for help on using the changeset viewer.
