|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
| package nu.xom; |
|
23 |
| |
|
24 |
| import java.io.Writer; |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
| |
|
35 |
| class ISOGreekWriter extends TextWriter { |
|
36 |
| |
|
37 |
1
| ISOGreekWriter(Writer out, String encoding) {
|
|
38 |
1
| super(out, encoding);
|
|
39 |
| } |
|
40 |
| |
|
41 |
| |
|
42 |
| |
|
43 |
| |
|
44 |
255083
| boolean needsEscaping(char c) {
|
|
45 |
191212
| if (c < 127) return false;
|
|
46 |
63871
| switch (c) {
|
|
47 |
1
| case 0x0384: return false;
|
|
48 |
1
| case 0x0385: return false;
|
|
49 |
1
| case 0x0386: return false;
|
|
50 |
1
| case 0x0387: return true;
|
|
51 |
1
| case 0x0388: return false;
|
|
52 |
1
| case 0x0389: return false;
|
|
53 |
1
| case 0x038A: return false;
|
|
54 |
1
| case 0x038B: return true;
|
|
55 |
1
| case 0x038C: return false;
|
|
56 |
1
| case 0x038D: return true;
|
|
57 |
1
| case 0x038E: return false;
|
|
58 |
1
| case 0x038F: return false;
|
|
59 |
1
| case 0x0390: return false;
|
|
60 |
1
| case 0x0391: return false;
|
|
61 |
1
| case 0x0392: return false;
|
|
62 |
1
| case 0x0393: return false;
|
|
63 |
1
| case 0x0394: return false;
|
|
64 |
1
| case 0x0395: return false;
|
|
65 |
1
| case 0x0396: return false;
|
|
66 |
1
| case 0x0397: return false;
|
|
67 |
1
| case 0x0398: return false;
|
|
68 |
1
| case 0x0399: return false;
|
|
69 |
1
| case 0x039A: return false;
|
|
70 |
1
| case 0x039B: return false;
|
|
71 |
1
| case 0x039C: return false;
|
|
72 |
1
| case 0x039D: return false;
|
|
73 |
1
| case 0x039E: return false;
|
|
74 |
1
| case 0x039F: return false;
|
|
75 |
1
| case 0x03A0: return false;
|
|
76 |
1
| case 0x03A1: return false;
|
|
77 |
1
| case 0x03A2: return true;
|
|
78 |
1
| case 0x03A3: return false;
|
|
79 |
1
| case 0x03A4: return false;
|
|
80 |
1
| case 0x03A5: return false;
|
|
81 |
1
| case 0x03A6: return false;
|
|
82 |
1
| case 0x03A7: return false;
|
|
83 |
1
| case 0x03A8: return false;
|
|
84 |
1
| case 0x03A9: return false;
|
|
85 |
1
| case 0x03AA: return false;
|
|
86 |
1
| case 0x03AB: return false;
|
|
87 |
1
| case 0x03AC: return false;
|
|
88 |
1
| case 0x03AD: return false;
|
|
89 |
1
| case 0x03AE: return false;
|
|
90 |
1
| case 0x03AF: return false;
|
|
91 |
1
| case 0x03B0: return false;
|
|
92 |
1
| case 0x03B1: return false;
|
|
93 |
1
| case 0x03B2: return false;
|
|
94 |
1
| case 0x03B3: return false;
|
|
95 |
1
| case 0x03B4: return false;
|
|
96 |
1
| case 0x03B5: return false;
|
|
97 |
1
| case 0x03B6: return false;
|
|
98 |
1
| case 0x03B7: return false;
|
|
99 |
1
| case 0x03B8: return false;
|
|
100 |
1
| case 0x03B9: return false;
|
|
101 |
1
| case 0x03BA: return false;
|
|
102 |
1
| case 0x03BB: return false;
|
|
103 |
1
| case 0x03BC: return false;
|
|
104 |
1
| case 0x03BD: return false;
|
|
105 |
1
| case 0x03BE: return false;
|
|
106 |
1
| case 0x03BF: return false;
|
|
107 |
1
| case 0x03C0: return false;
|
|
108 |
1
| case 0x03C1: return false;
|
|
109 |
1
| case 0x03C2: return false;
|
|
110 |
1
| case 0x03C3: return false;
|
|
111 |
1
| case 0x03C4: return false;
|
|
112 |
1
| case 0x03C5: return false;
|
|
113 |
1
| case 0x03C6: return false;
|
|
114 |
1
| case 0x03C7: return false;
|
|
115 |
1
| case 0x03C8: return false;
|
|
116 |
1
| case 0x03C9: return false;
|
|
117 |
1
| case 0x03CA: return false;
|
|
118 |
1
| case 0x03CB: return false;
|
|
119 |
1
| case 0x03CC: return false;
|
|
120 |
1
| case 0x03CD: return false;
|
|
121 |
1
| case 0x03CE: return false;
|
|
122 |
| } |
|
123 |
63796
| switch (c) {
|
|
124 |
1
| case 0x00A0: return false;
|
|
125 |
1
| case 0x00A1: return true;
|
|
126 |
1
| case 0x00A2: return true;
|
|
127 |
1
| case 0x00A3: return false;
|
|
128 |
1
| case 0x00A4: return true;
|
|
129 |
1
| case 0x00A5: return true;
|
|
130 |
1
| case 0x00A6: return false;
|
|
131 |
1
| case 0x00A7: return false;
|
|
132 |
1
| case 0x00A8: return false;
|
|
133 |
1
| case 0x00A9: return false;
|
|
134 |
1
| case 0x00AA: return true;
|
|
135 |
1
| case 0x00AB: return false;
|
|
136 |
1
| case 0x00AC: return false;
|
|
137 |
1
| case 0x00AD: return false;
|
|
138 |
1
| case 0x00AE: return true;
|
|
139 |
1
| case 0x00AF: return true;
|
|
140 |
1
| case 0x00B0: return false;
|
|
141 |
1
| case 0x00B1: return false;
|
|
142 |
1
| case 0x00B2: return false;
|
|
143 |
1
| case 0x00B3: return false;
|
|
144 |
1
| case 0x00B4: return true;
|
|
145 |
1
| case 0x00B5: return true;
|
|
146 |
1
| case 0x00B6: return true;
|
|
147 |
1
| case 0x00B7: return false;
|
|
148 |
1
| case 0x00B8: return true;
|
|
149 |
1
| case 0x00B9: return true;
|
|
150 |
1
| case 0x00BA: return true;
|
|
151 |
1
| case 0x00BB: return false;
|
|
152 |
1
| case 0x00BC: return true;
|
|
153 |
1
| case 0x00BD: return false;
|
|
154 |
| } |
|
155 |
63766
| switch (c) {
|
|
156 |
1
| case 0x2015: return false;
|
|
157 |
| |
|
158 |
| |
|
159 |
| |
|
160 |
| |
|
161 |
| |
|
162 |
| |
|
163 |
| |
|
164 |
| |
|
165 |
| } |
|
166 |
63765
| return true;
|
|
167 |
| } |
|
168 |
| |
|
169 |
| } |