1# 2# TERMS AND CONDITIONS 3# FOR 4# OPEN SOURCE CODE LICENSE 5# Version 1.1 6# 7# Japan Registry Services Co., Ltd. ("JPRS"), a Japanese corporation 8# having its head office at Chiyoda First Bldg. East 13F 3-8-1 Nishi-Kanda, 9# Chiyoda-ku, Tokyo 101-0065, Japan, grants you the license for open source 10# code specified in EXHIBIT A the "Code" subject to the following Terms and 11# Conditions ("OSCL"). 12# 13# 1. License Grant. 14# JPRS hereby grants you a worldwide, royalty-free, non-exclusive 15# license, subject to third party intellectual property claims: 16# (a) under intellectual property rights (other than patent or 17# trademark) licensable by JPRS to use, reproduce, modify, display, 18# perform, sublicense and distribute the Code (or portions thereof) 19# with or without modifications, and/or as part of a derivative work; 20# or 21# (b) under claims of the infringement through the making, using, 22# offering to sell and/or otherwise disposing the JPRS Revised Code 23# (or portions thereof); 24# (c) the licenses granted in this Section 1(a) and (b) are effective on 25# the date JPRS first distributes the Code to you under the terms of 26# this OSCL; 27# (d) Notwithstanding the above stated terms, no patent license is 28# granted: 29# 1) for a code that you delete from the Code; 30# 2) separate from the Code; or 31# 3) for infringements caused by: 32# i) modification of the Code; or 33# ii) combination of the Code with other software or devices. 34# 35# 2. Consents. 36# You agree that: 37# (a) you must include a copy of this OSCL and the notice set forth in 38# EXHIBIT A with every copy of the Code you distribute; 39# (b) you must include a copy of this OSCL and the notice set forth in 40# EXHIBIT A with every copy of binary form of the Code in the 41# documentation and/or other materials provided with the distribution; 42# (c) you may not offer or impose any terms on any source code version 43# that alters or restricts the applicable version of this OSCL or 44# the recipients' rights hereunder. 45# (d) If the terms and conditions are set forth in EXHIBIT A, you must 46# comply with those terms and conditions. 47# 48# 3. Proprietary Information. 49# All trademarks, service marks, patents, copyrights, trade secrets, and 50# other proprietary rights in or related to the Code are and will remain 51# the exclusive property of JPRS or its licensors, whether or not 52# specifically recognized or perfected under local law except specified 53# in this OSCL; provided however you agree and understand that the JPRS 54# name may not be used to endorse or promote this Code without prior 55# written approval of JPRS. 56# 57# 4. WARRANTY DISCLAIMER. 58# JPRS MAKES NO REPRESENTATIONS AND WARRANTIES REGARDING THE USE OF THE 59# CODE, NOR DOES JPRS MAKE ANY REPRESENTATIONS THAT THE CODE WILL BECOME 60# COMMERCIALLY AVAILABLE. JPRS, ITS AFFILIATES, AND ITS SUPPLIERS DO NOT 61# WARRANT OR REPRESENT THAT THE CODE IS FREE OF ERRORS OR THAT THE CODE 62# IS SUITABLE FOR TRANSLATION AND/OR LOCALIZATION. THE CODE IS PROVIDED 63# ON AN "AS IS" BASIS AND JPRS AND ITS SUPPLIERS HAVE NO OBLIGATION TO 64# CORRECT ERRORS OR TO SUPPORT THE CODE UNDER THIS OSCL FOR ANY REASON. 65# TO THE FULL EXTENT PERMITTED BY LAW, ALL OBLIGATIONS ARE HEREBY 66# EXCLUDED WHETHER EXPRESS, STATUTORY OR IMPLIED UNDER LAW, COURSE OF 67# DEALING, CUSTOM, TRADE USAGE, ORAL OR WRITTEN STATEMENT OR OTHERWISE, 68# INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY 69# OR FITNESS FOR A PARTICULAR PURPOSE CONCERNING THE CODE. 70# 71# 5. NO LIABILITY. 72# UNDER NO CIRCUMSTANCES SHALL JPRS AND/OR ITS AFFILIATES, LICENSORS, OR 73# REPRESENTATIVES BE LIABLE FOR ANY DAMAGES INCLUDING BUT NOT LIMITED TO 74# CONSEQUENTIAL, INDIRECT, SPECIAL, PUNITIVE OR INCIDENTAL DAMAGES, 75# WHETHER FORESEEABLE OR UNFORESEEABLE, BASED ON YOUR CLAIMS, INCLUDING, 76# BUT NOT LIMITED TO, CLAIMS FOR LOSS OF DATA, GOODWILL, PROFITS, USE OF 77# MONEY, INTERRUPTION IN USE OR AVAILABILITY OF DATA, STOPPAGE, IMPLIED 78# WARRANTY, BREACH OF CONTRACT, MISREPRESENTATION, NEGLIGENCE, STRICT 79# LIABILITY IN TORT, OR OTHERWISE. 80# 81# 6. Indemnification. 82# You hereby agree to indemnify, defend, and hold harmless JPRS for any 83# liability incurred by JRPS due to your terms of warranty, support, 84# indemnity, or liability offered by you to any third party. 85# 86# 7. Termination. 87# 7.1 This OSCL shall be automatically terminated in the events that: 88# (a) You fail to comply with the terms herein and fail to cure such 89# breach within 30 days of becoming aware of the breach; 90# (b) You initiate patent or copyright infringement litigation against 91# any party (including a cross-claim or counterclaim in a lawsuit) 92# alleging that the Code constitutes a direct or indirect patent or 93# copyright infringement, in such case, this OSCL to you shall 94# terminate as of the date such litigation is filed; 95# 7.2 In the event of termination under Sections 7.1(a) or 7.1(b) above, 96# all end user license agreements (excluding distributors and 97# resellers) which have been validly granted by You or any distributor 98# hereunder prior to termination shall survive termination. 99# 100# 101# 8. General. 102# This OSCL shall be governed by, and construed and enforced in 103# accordance with, the laws of Japan. Any litigation or arbitration 104# between the parties shall be conducted exclusively in Tokyo, Japan 105# except written consent of JPRS provides other venue. 106# 107# 108# EXHIBIT A 109# 110# The original open source code of idnkit-2 is idnkit-1.0 developed and 111# conceived by Japan Network Information Center ("JPNIC"), a Japanese 112# association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, 113# Chiyoda-ku, Tokyo 101-0047, Japan, and JPRS modifies above original code 114# under following Terms and Conditions set forth by JPNIC. 115# 116# JPNIC 117# 118# Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved. 119# 120# By using this file, you agree to the terms and conditions set forth bellow. 121# 122# LICENSE TERMS AND CONDITIONS 123# 124# The following License Terms and Conditions apply, unless a different 125# license is obtained from Japan Network Information Center ("JPNIC"), 126# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, 127# Chiyoda-ku, Tokyo 101-0047, Japan. 128# 129# 1. Use, Modification and Redistribution (including distribution of any 130# modified or derived work) in source and/or binary forms is permitted 131# under this License Terms and Conditions. 132# 133# 2. Redistribution of source code must retain the copyright notices as they 134# appear in each source code file, this License Terms and Conditions. 135# 136# 3. Redistribution in binary form must reproduce the Copyright Notice, 137# this License Terms and Conditions, in the documentation and/or other 138# materials provided with the distribution. For the purposes of binary 139# distribution the "Copyright Notice" refers to the following language: 140# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." 141# 142# 4. The name of JPNIC may not be used to endorse or promote products 143# derived from this Software without specific prior written approval of 144# JPNIC. 145# 146# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC 147# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 148# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 149# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE 150# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 151# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 152# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 153# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 154# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 155# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 156# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 157# 158# 159# JPRS Public License Notice 160# For 161# idnkit-2. 162# 163# The contents of this file are subject to the Terms and Conditions for 164# the Open Source Code License (the "OSCL"). You may not use this file 165# except in compliance with above terms and conditions. A copy of the OSCL 166# is available at <http://jprs.co.jp/idn/>. 167# The JPRS Revised Code is idnkit-2. 168# The Initial Developer of the JPRS Revised Code is Japan Network 169# Information Center ("JPNIC"), a Japanese association, 170# Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, Chiyoda-ku, Tokyo 171# 101-0047, Japan. 172# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." 173# "Copyright (c) 2010-2012 Japan Registry Services Co., Ltd. All rights reserved." 174# Contributor(s): ______________________________________. 175# 176# If you wish to allow use of your version of this file only under the 177# above License(s) and not to allow others to use your version of this 178# file, please indicate your decision by deleting the relevant provisions 179# above and replacing them with the notice and other provisions required 180# by the above License(s). If you do not delete the relevant provisions, 181# a recipient may use your version of this file under either the above 182# License(s). 183# 184 185# 186# Tests about conversion from UTF-8 to UTF-32. 187# The idnkit library does it internally. 188# 189# Char. number range | UTF-8 octet sequence 190# (hexadecimal) | (binary) 191# --------------------+--------------------------------------------- 192# 0000 0000-0000 007F | 0xxxxxxx 193# 0000 0080-0000 07FF | 110xxxxx 10xxxxxx 194# 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx 195# 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 196# 197-- 198# 199# UTF-8 to UTF-32 conversion test. 200# The input name is "\x7f" which represents U+007F. 201# 202 api: decodename2 203 local_encoding: U-escape 204 auxencoding: UTF-8 205 conf: 206 from: <<7f>> 207 actions: IDN_LOCALCONV 208 result: success 209 to: \u{7f} 210-- 211# 212# UTF-8 to UTF-32 conversion test. 213# The input name is "\x80". 214# This is an invalid UTF-8 string since the first byte is "10xxxxxx". 215# 216 api: decodename2 217 local_encoding: U-escape 218 auxencoding: UTF-8 219 conf: 220 from: <<80>> 221 actions: IDN_LOCALCONV 222 result: invalid encoding found 223 to: 224-- 225# 226# UTF-8 to UTF-32 conversion test. 227# The input name is "\xdf". 228# This is an invalid UTF-8 string since the first byte is "10xxxxxx". 229# 230 api: decodename2 231 local_encoding: U-escape 232 auxencoding: UTF-8 233 conf: 234 from: <<df>> 235 actions: IDN_LOCALCONV 236 result: invalid encoding found 237 to: 238-- 239# 240# UTF-8 to UTF-32 conversion test. 241# The input name is "\xc2\x7f" 242# This is an invalid UTF-8 string since the second byte is not "10xxxxxx". 243# 244 api: decodename2 245 local_encoding: U-escape 246 auxencoding: UTF-8 247 conf: 248 from: <<c2>><<7f>> 249 actions: IDN_LOCALCONV 250 result: invalid encoding found 251 to: 252-- 253# 254# UTF-8 to UTF-32 conversion test. 255# The input name is "\xc1\xbf" 256# This is an invalid UTF-8 string since it represents U+007F with three bytes. 257# 258 api: decodename2 259 local_encoding: U-escape 260 auxencoding: UTF-8 261 conf: 262 from: <<c1>><<bf>> 263 actions: IDN_LOCALCONV 264 result: invalid encoding found 265 to: 266-- 267# 268# UTF-8 to UTF-32 conversion test. 269# The input name is "\xc2\x80" which represetns "U+0080". 270# 271 api: decodename2 272 local_encoding: U-escape 273 auxencoding: UTF-8 274 conf: 275 from: <<c2>><<80>> 276 actions: IDN_LOCALCONV 277 result: success 278 to: \u{80} 279-- 280# 281# UTF-8 to UTF-32 conversion test. 282# The input name is "\xdf\xbf" which represetns "U+07FF". 283# 284 api: decodename2 285 local_encoding: U-escape 286 auxencoding: UTF-8 287 conf: 288 from: <<df>><<bf>> 289 actions: IDN_LOCALCONV 290 result: success 291 to: \u{7ff} 292-- 293# 294# UTF-8 to UTF-32 conversion test. 295# The input name is "\xe0\x9f\xbf". 296# This is an invalid UTF-8 string since it represents U+07FF with three bytes. 297# 298 api: decodename2 299 local_encoding: U-escape 300 auxencoding: UTF-8 301 conf: 302 from: <<e0>><<9f>><<bf>> 303 actions: IDN_LOCALCONV 304 result: invalid encoding found 305 to: 306-- 307# 308# UTF-8 to UTF-32 conversion test. 309# The input name is "\xe0\x7f\x80". 310# This is an invalid UTF-8 string since the second byte is not "10xxxxxx". 311# 312 api: decodename2 313 local_encoding: U-escape 314 auxencoding: UTF-8 315 conf: 316 from: <<e1>><<7f>><<80>> 317 actions: IDN_LOCALCONV 318 result: invalid encoding found 319 to: 320-- 321# 322# UTF-8 to UTF-32 conversion test. 323# The input name is "\xe0\x80\x7f" 324# This is an invalid UTF-8 string since the third byte is not "10xxxxxx". 325# 326 api: decodename2 327 local_encoding: U-escape 328 auxencoding: UTF-8 329 conf: 330 from: <<e1>><<80>><<7f>> 331 actions: IDN_LOCALCONV 332 result: invalid encoding found 333 to: 334-- 335# 336# UTF-8 to UTF-32 conversion test. 337# The input name is "\xe0\xa0\x80" which represetns "U+0800". 338# 339 api: decodename2 340 local_encoding: U-escape 341 auxencoding: UTF-8 342 conf: 343 from: <<e0>><<a0>><<80>> 344 actions: IDN_LOCALCONV 345 result: success 346 to: \u{800} 347-- 348# 349# UTF-8 to UTF-32 conversion test. 350# The input name is "\xed\x9f\xbf" which represetns "U+D7FF". 351# 352 api: decodename2 353 local_encoding: U-escape 354 auxencoding: UTF-8 355 conf: 356 from: <<ed>><<9f>><<bf>> 357 actions: IDN_LOCALCONV 358 result: success 359 to: \u{d7ff} 360-- 361# 362# UTF-8 to UTF-32 conversion test. 363# The input name is "\xed\xa0\x80" which represetns "U+D800"; 364# U+D800 is used for surrogate pair. 365# 366 api: decodename2 367 local_encoding: U-escape 368 auxencoding: UTF-8 369 conf: 370 from: <<ed>><<a0>><<80>> 371 actions: IDN_LOCALCONV 372 result: invalid encoding found 373 to: 374-- 375# 376# UTF-8 to UTF-32 conversion test. 377# The input name is "\xed\xbf\xbf" which represetns "U+DFFF"; 378# U+D800 is used for surrogate pair. 379# 380 api: decodename2 381 local_encoding: U-escape 382 auxencoding: UTF-8 383 conf: 384 from: <<ed>><<bf>><<bf>> 385 actions: IDN_LOCALCONV 386 result: invalid encoding found 387 to: 388-- 389# 390# UTF-8 to UTF-32 conversion test. 391# The input name is "\xee\x80\x80" which represetns "U+E000"; 392# U+D800 is used for surrogate pair. 393# 394 api: decodename2 395 local_encoding: U-escape 396 auxencoding: UTF-8 397 conf: 398 from: <<ee>><<80>><<80>> 399 actions: IDN_LOCALCONV 400 result: success 401 to: \u{e000} 402-- 403# 404# UTF-8 to UTF-32 conversion test. 405# The input name is "\xdf\xbf" which represetns "U+FFFF". 406# 407 api: decodename2 408 local_encoding: U-escape 409 auxencoding: UTF-8 410 conf: 411 from: <<ef>><<bf>><<bf>> 412 actions: IDN_LOCALCONV 413 result: success 414 to: \u{ffff} 415-- 416# 417# UTF-8 to UTF-32 conversion test. 418# The input name is "\xf0\x8f\xbf\xbf". 419# This is an invalid UTF-8 string since it represents U+FFFF with four bytes. 420# 421 api: decodename2 422 local_encoding: U-escape 423 auxencoding: UTF-8 424 conf: 425 from: <<f0>><<8f>><<bf>><<bf>> 426 actions: IDN_LOCALCONV 427 result: invalid encoding found 428 to: 429-- 430# 431# UTF-8 to UTF-32 conversion test. 432# The input name is "\xe0\x7f\x80\x80". 433# This is an invalid UTF-8 string since the second byte is not "10xxxxxx". 434# 435 api: decodename2 436 local_encoding: U-escape 437 auxencoding: UTF-8 438 conf: 439 from: <<f1>><<7f>><<80>><<80>> 440 actions: IDN_LOCALCONV 441 result: invalid encoding found 442 to: 443-- 444# 445# UTF-8 to UTF-32 conversion test. 446# The input name is "\xf1\x80\x7f\x80". 447# This is an invalid UTF-8 string since the third byte is not "10xxxxxx". 448# 449 api: decodename2 450 local_encoding: U-escape 451 auxencoding: UTF-8 452 conf: 453 from: <<f1>><<80>><<7f>><<80>> 454 actions: IDN_LOCALCONV 455 result: invalid encoding found 456 to: 457-- 458# 459# UTF-8 to UTF-32 conversion test. 460# The input name is "\xf0\x80\x80\x7f". 461# This is an invalid UTF-8 string since the forth byte is not "10xxxxxx". 462# 463 api: decodename2 464 local_encoding: U-escape 465 auxencoding: UTF-8 466 conf: 467 from: <<f1>><<80>><<80>><<7f>> 468 actions: IDN_LOCALCONV 469 result: invalid encoding found 470 to: 471-- 472# 473# UTF-8 to UTF-32 conversion test. 474# The input name is "\xf0\x90\x80\x80" which represetns "U+10000". 475# 476 api: decodename2 477 local_encoding: U-escape 478 auxencoding: UTF-8 479 conf: 480 from: <<f0>><<90>><<80>><<80>> 481 actions: IDN_LOCALCONV 482 result: success 483 to: \u{10000} 484-- 485# 486# UTF-8 to UTF-32 conversion test. 487# The input name is "\xf4\x8f\xbf\xbf" which represetns "U+10FFFF". 488# 489 api: decodename2 490 local_encoding: U-escape 491 auxencoding: UTF-8 492 conf: 493 from: <<f4>><<8f>><<bf>><<bf>> 494 actions: IDN_LOCALCONV 495 result: success 496 to: \u{10ffff} 497-- 498# 499# UTF-8 to UTF-32 conversion test. 500# The input name is "\xf4\x90\x80\x80" which represetns "U+110000". 501# 502 api: decodename2 503 local_encoding: U-escape 504 auxencoding: UTF-8 505 conf: 506 from: <<f4>><<90>><<80>><<80>> 507 actions: IDN_LOCALCONV 508 result: invalid encoding found 509 to: 510-- 511# 512# UTF-8 to UTF-32 conversion test. 513# The input name is "\xc2". 514# This is an invalid UTF-8 string since it lacks the second byte. 515# 516 api: decodename2 517 local_encoding: U-escape 518 auxencoding: UTF-8 519 conf: 520 from: <<c2>> 521 actions: IDN_LOCALCONV 522 result: invalid encoding found 523 to: 524-- 525# 526# UTF-8 to UTF-32 conversion test. 527# The input name is "\xdf". 528# This is an invalid UTF-8 string since it lacks the second byte. 529# 530 api: decodename2 531 local_encoding: U-escape 532 auxencoding: UTF-8 533 conf: 534 from: <<df>> 535 actions: IDN_LOCALCONV 536 result: invalid encoding found 537 to: 538-- 539# 540# UTF-8 to UTF-32 conversion test. 541# The input name is "\xe0\xa0". 542# This is an invalid UTF-8 string since it lacks the third byte. 543# 544 api: decodename2 545 local_encoding: U-escape 546 auxencoding: UTF-8 547 conf: 548 from: <<e0>><<a0>> 549 actions: IDN_LOCALCONV 550 result: invalid encoding found 551 to: 552-- 553# 554# UTF-8 to UTF-32 conversion test. 555# The input name is "\xe0\xbf". 556# This is an invalid UTF-8 string since it lacks the third byte. 557# 558 api: decodename2 559 local_encoding: U-escape 560 auxencoding: UTF-8 561 conf: 562 from: <<e0>><<bf>> 563 actions: IDN_LOCALCONV 564 result: invalid encoding found 565 to: 566-- 567# 568# UTF-8 to UTF-32 conversion test. 569# The input name is "\xf0\x90\x80". 570# This is an invalid UTF-8 string since it lacks the forth byte. 571# 572 api: decodename2 573 local_encoding: U-escape 574 auxencoding: UTF-8 575 conf: 576 from: <<f0>><<90>><<80>> 577 actions: IDN_LOCALCONV 578 result: invalid encoding found 579 to: 580-- 581# 582# UTF-8 to UTF-32 conversion test. 583# The input name is "\xf4\x8f\xbf". 584# This is an invalid UTF-8 string since it lacks the forth byte. 585# 586 api: decodename2 587 local_encoding: U-escape 588 auxencoding: UTF-8 589 conf: 590 from: <<f4>><<8f>><<bf>> 591 actions: IDN_LOCALCONV 592 result: invalid encoding found 593 to: 594-- 595