1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25/* 26 * ICU License - ICU 1.8.1 and later 27 * 28 * COPYRIGHT AND PERMISSION NOTICE 29 * 30 * Copyright (c) 1995-2005 International Business Machines Corporation and others 31 * All rights reserved. 32 * 33 * Permission is hereby granted, free of charge, to any person obtaining a 34 * copy of this software and associated documentation files (the 35 * "Software"), to deal in the Software without restriction, including 36 * without limitation the rights to use, copy, modify, merge, publish, 37 * distribute, and/or sell copies of the Software, and to permit persons 38 * to whom the Software is furnished to do so, provided that the above 39 * copyright notice(s) and this permission notice appear in all copies of 40 * the Software and that both the above copyright notice(s) and this 41 * permission notice appear in supporting documentation. 42 * 43 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 44 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 45 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 46 * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 47 * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 48 * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 49 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 50 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 51 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 52 * 53 * Except as contained in this notice, the name of a copyright holder 54 * shall not be used in advertising or otherwise to promote the sale, use 55 * or other dealings in this Software without prior written authorization 56 * of the copyright holder. 57 * 58 * -------------------------------------------------------------------------- 59 * All trademarks and registered trademarks mentioned herein are the property 60 * of their respective owners. 61 */ 62 63#include <sys/errno.h> 64utf8%system { 65 direction { 66 @condition { 67 inputsize >= 1; 68 @between 0X0...0X7F; 69 } @map { 70 0x00 0x00 // U+0000 71 0x01 0x01 // U+0001 72 0x02 0x02 // U+0002 73 0x03 0x03 // U+0003 74 0x04 0x37 // U+0004 75 0x05 0x2D // U+0005 76 0x06 0x2E // U+0006 77 0x07 0x2F // U+0007 78 0x08 0x16 // U+0008 79 0x09 0x05 // U+0009 80 0x0A 0x25 // U+000a 81 0x0B 0x0B // U+000b 82 0x0C 0x0C // U+000c 83 0x0D 0x0D // U+000d 84 0x0E 0x0E // U+000e 85 0x0F 0x0F // U+000f 86 0x10 0x10 // U+0010 87 0x11 0x11 // U+0011 88 0x12 0x12 // U+0012 89 0x13 0x13 // U+0013 90 0x14 0x3C // U+0014 91 0x15 0x3D // U+0015 92 0x16 0x32 // U+0016 93 0x17 0x26 // U+0017 94 0x18 0x18 // U+0018 95 0x19 0x19 // U+0019 96 0x1A 0x3F // U+001a 97 0x1B 0x27 // U+001b 98 0x1C 0x1C // U+001c 99 0x1D 0x1D // U+001d 100 0x1E 0x1E // U+001e 101 0x1F 0x1F // U+001f 102 0x20 0x40 // U+0020 103 0x21 0x4F // U+0021 104 0x22 0x7F // U+0022 105 0x23 0x7B // U+0023 106 0x24 0x5B // U+0024 107 0x25 0x6C // U+0025 108 0x26 0x50 // U+0026 109 0x27 0x7D // U+0027 110 0x28 0x4D // U+0028 111 0x29 0x5D // U+0029 112 0x2A 0x5C // U+002a 113 0x2B 0x4E // U+002b 114 0x2C 0x6B // U+002c 115 0x2D 0x60 // U+002d 116 0x2E 0x4B // U+002e 117 0x2F 0x61 // U+002f 118 0x30 0xF0 // U+0030 119 0x31 0xF1 // U+0031 120 0x32 0xF2 // U+0032 121 0x33 0xF3 // U+0033 122 0x34 0xF4 // U+0034 123 0x35 0xF5 // U+0035 124 0x36 0xF6 // U+0036 125 0x37 0xF7 // U+0037 126 0x38 0xF8 // U+0038 127 0x39 0xF9 // U+0039 128 0x3A 0x7A // U+003a 129 0x3B 0x5E // U+003b 130 0x3C 0x4C // U+003c 131 0x3D 0x7E // U+003d 132 0x3E 0x6E // U+003e 133 0x3F 0x6F // U+003f 134 0x40 0x7C // U+0040 135 0x41 0xC1 // U+0041 136 0x42 0xC2 // U+0042 137 0x43 0xC3 // U+0043 138 0x44 0xC4 // U+0044 139 0x45 0xC5 // U+0045 140 0x46 0xC6 // U+0046 141 0x47 0xC7 // U+0047 142 0x48 0xC8 // U+0048 143 0x49 0xC9 // U+0049 144 0x4A 0xD1 // U+004a 145 0x4B 0xD2 // U+004b 146 0x4C 0xD3 // U+004c 147 0x4D 0xD4 // U+004d 148 0x4E 0xD5 // U+004e 149 0x4F 0xD6 // U+004f 150 0x50 0xD7 // U+0050 151 0x51 0xD8 // U+0051 152 0x52 0xD9 // U+0052 153 0x53 0xE2 // U+0053 154 0x54 0xE3 // U+0054 155 0x55 0xE4 // U+0055 156 0x56 0xE5 // U+0056 157 0x57 0xE6 // U+0057 158 0x58 0xE7 // U+0058 159 0x59 0xE8 // U+0059 160 0x5A 0xE9 // U+005a 161 0x5B 0x4A // U+005b 162 0x5C 0xE0 // U+005c 163 0x5D 0x5A // U+005d 164 0x5E 0x5F // U+005e 165 0x5F 0x6D // U+005f 166 0x60 0x79 // U+0060 167 0x61 0x81 // U+0061 168 0x62 0x82 // U+0062 169 0x63 0x83 // U+0063 170 0x64 0x84 // U+0064 171 0x65 0x85 // U+0065 172 0x66 0x86 // U+0066 173 0x67 0x87 // U+0067 174 0x68 0x88 // U+0068 175 0x69 0x89 // U+0069 176 0x6A 0x91 // U+006a 177 0x6B 0x92 // U+006b 178 0x6C 0x93 // U+006c 179 0x6D 0x94 // U+006d 180 0x6E 0x95 // U+006e 181 0x6F 0x96 // U+006f 182 0x70 0x97 // U+0070 183 0x71 0x98 // U+0071 184 0x72 0x99 // U+0072 185 0x73 0xA2 // U+0073 186 0x74 0xA3 // U+0074 187 0x75 0xA4 // U+0075 188 0x76 0xA5 // U+0076 189 0x77 0xA6 // U+0077 190 0x78 0xA7 // U+0078 191 0x79 0xA8 // U+0079 192 0x7A 0xA9 // U+007a 193 0x7B 0xC0 // U+007b 194 0x7C 0x6A // U+007c 195 0x7D 0xD0 // U+007d 196 0x7E 0xA1 // U+007e 197 0x7F 0x07 // U+007f 198 default 0x6f 199 }; 200 @condition { 201 inputsize <= 1; 202 @between 0XC0...0XFD; 203 } @operation { 204 error EINVAL; 205 }; 206 @condition { 207 inputsize >= 2; 208 @between 0XC080...0XDFBF; 209 } @map { 210 0xC280 0x20 // U+0080 211 0xC281 0x21 // U+0081 212 0xC282 0x22 // U+0082 213 0xC283 0x23 // U+0083 214 0xC284 0x24 // U+0084 215 0xC285 0x15 // U+0085 216 0xC286 0x06 // U+0086 217 0xC287 0x17 // U+0087 218 0xC288 0x28 // U+0088 219 0xC289 0x29 // U+0089 220 0xC28A 0x2A // U+008a 221 0xC28B 0x2B // U+008b 222 0xC28C 0x2C // U+008c 223 0xC28D 0x09 // U+008d 224 0xC28E 0x0A // U+008e 225 0xC28F 0x1B // U+008f 226 0xC290 0x30 // U+0090 227 0xC291 0x31 // U+0091 228 0xC292 0x1A // U+0092 229 0xC293 0x33 // U+0093 230 0xC294 0x34 // U+0094 231 0xC295 0x35 // U+0095 232 0xC296 0x36 // U+0096 233 0xC297 0x08 // U+0097 234 0xC298 0x38 // U+0098 235 0xC299 0x39 // U+0099 236 0xC29A 0x3A // U+009a 237 0xC29B 0x3B // U+009b 238 0xC29C 0x04 // U+009c 239 0xC29D 0x14 // U+009d 240 0xC29E 0x3E // U+009e 241 0xC29F 0xFF // U+009f 242 0xC2A0 0x74 // U+00a0 243 0xC2A3 0xB0 // U+00a3 244 0xC2A6 0xDF // U+00a6 245 0xC2A7 0xEB // U+00a7 246 0xC2A8 0x70 // U+00a8 247 0xC2A9 0xFB // U+00a9 248 0xC2AB 0xEE // U+00ab 249 0xC2AC 0xEF // U+00ac 250 0xC2AD 0xCA // U+00ad 251 0xC2B0 0x90 // U+00b0 252 0xC2B1 0xDA // U+00b1 253 0xC2B2 0xEA // U+00b2 254 0xC2B3 0xFA // U+00b3 255 0xC2B4 0xA0 // U+00b4 256 0xC2BB 0xFE // U+00bb 257 0xC2BD 0xDB // U+00bd 258 0xCE85 0x80 // U+0385 259 0xCE86 0x71 // U+0386 260 0xCE87 0xDD // U+0387 261 0xCE88 0x72 // U+0388 262 0xCE89 0x73 // U+0389 263 0xCE8A 0x75 // U+038a 264 0xCE8C 0x76 // U+038c 265 0xCE8E 0x77 // U+038e 266 0xCE8F 0x78 // U+038f 267 0xCE90 0xCC // U+0390 268 0xCE91 0x41 // U+0391 269 0xCE92 0x42 // U+0392 270 0xCE93 0x43 // U+0393 271 0xCE94 0x44 // U+0394 272 0xCE95 0x45 // U+0395 273 0xCE96 0x46 // U+0396 274 0xCE97 0x47 // U+0397 275 0xCE98 0x48 // U+0398 276 0xCE99 0x49 // U+0399 277 0xCE9A 0x51 // U+039a 278 0xCE9B 0x52 // U+039b 279 0xCE9C 0x53 // U+039c 280 0xCE9D 0x54 // U+039d 281 0xCE9E 0x55 // U+039e 282 0xCE9F 0x56 // U+039f 283 0xCEA0 0x57 // U+03a0 284 0xCEA1 0x58 // U+03a1 285 0xCEA3 0x59 // U+03a3 286 0xCEA4 0x62 // U+03a4 287 0xCEA5 0x63 // U+03a5 288 0xCEA6 0x64 // U+03a6 289 0xCEA7 0x65 // U+03a7 290 0xCEA8 0x66 // U+03a8 291 0xCEA9 0x67 // U+03a9 292 0xCEAA 0x68 // U+03aa 293 0xCEAB 0x69 // U+03ab 294 0xCEAC 0xB1 // U+03ac 295 0xCEAD 0xB2 // U+03ad 296 0xCEAE 0xB3 // U+03ae 297 0xCEAF 0xB5 // U+03af 298 0xCEB0 0xCD // U+03b0 299 0xCEB1 0x8A // U+03b1 300 0xCEB2 0x8B // U+03b2 301 0xCEB3 0x8C // U+03b3 302 0xCEB4 0x8D // U+03b4 303 0xCEB5 0x8E // U+03b5 304 0xCEB6 0x8F // U+03b6 305 0xCEB7 0x9A // U+03b7 306 0xCEB8 0x9B // U+03b8 307 0xCEB9 0x9C // U+03b9 308 0xCEBA 0x9D // U+03ba 309 0xCEBB 0x9E // U+03bb 310 0xCEBC 0x9F // U+03bc 311 0xCEBD 0xAA // U+03bd 312 0xCEBE 0xAB // U+03be 313 0xCEBF 0xAC // U+03bf 314 0xCF80 0xAD // U+03c0 315 0xCF81 0xAE // U+03c1 316 0xCF82 0xBA // U+03c2 317 0xCF83 0xAF // U+03c3 318 0xCF84 0xBB // U+03c4 319 0xCF85 0xBC // U+03c5 320 0xCF86 0xBD // U+03c6 321 0xCF87 0xBE // U+03c7 322 0xCF88 0xBF // U+03c8 323 0xCF89 0xCB // U+03c9 324 0xCF8A 0xB4 // U+03ca 325 0xCF8B 0xB8 // U+03cb 326 0xCF8C 0xB6 // U+03cc 327 0xCF8D 0xB7 // U+03cd 328 0xCF8E 0xB9 // U+03ce 329 default 0x6f 330 }; 331 @condition { 332 inputsize <= 2; 333 @between 0XE0...0XFD; 334 } @operation { 335 error EINVAL; 336 }; 337 @condition { 338 inputsize >= 3; 339 @between 0XE08080...0XECBFBF, 0XED8080...0XED9FBF, 0XEE8080...0XEFBFBF; 340 } @map { 341 0xE28095 0xCF // U+2015 342 0xE28098 0xCE // U+2018 343 0xE28099 0xDE // U+2019 344 0xefbfbe error 345 0xefbfbf error 346 default 0x6f 347 }; // for last @map syntax 348 @condition { 349 inputsize <= 3; 350 @between 0XF0...0XFD; 351 } @operation { 352 error EINVAL; 353 }; 354 @condition { 355 inputsize >= 4; 356 @between 0XF0808080...0XF7BFBFBF; 357 } @operation { 358 output = 0x6f; 359 discard 4; 360 }; 361 @condition { 362 inputsize <= 4; 363 @between 0XF8...0XFD; 364 } @operation { 365 error EINVAL; 366 }; 367 @condition { 368 inputsize >= 5; 369 @between 0XF880808080...0XFBBFBFBFBF; 370 } @operation { 371 output = 0x6f; 372 discard 5; 373 }; 374 @condition { 375 inputsize <= 5; 376 @between 0XFC...0XFD; 377 } @operation { 378 error EINVAL; 379 }; 380 @condition { 381 inputsize >= 6; 382 @between 0XFC8080808080...0XFDBFBFBFBFBF; 383 } @operation { 384 output = 0x6f; 385 discard 6; 386 }; 387 }; // for direction 388} // for conversion name 389