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 tld-local conversion. 187# 188-- 189###################################################################### 190# Basic tld-local conversion tests. 191###################################################################### 192-- 193# 194# tld-local conversion test. 195# Convert U+0041 (A) to U+0061 (a) if TLD is "jp". 196# 197 api: encodename 198 local_encoding: U-escape 199 conf: map tld-local 200 conf: tld-local jp @LOCALMAP_FILE1@ 201 localmap1: 0041; 0061; 202 from: ABC.jp 203 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 204 result: success 205 to: aBC.jp 206-- 207# 208# tld-local conversion test. 209# Convert U+0041 (A) to U+0061 (a) if TLD is "jp". 210# TLD of 'ltld-local' line is ".jp". 211# 212 api: encodename 213 local_encoding: U-escape 214 conf: map tld-local 215 conf: tld-local .jp @LOCALMAP_FILE1@ 216 localmap1: 0041; 0061; 217 from: ABC.jp 218 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 219 result: success 220 to: aBC.jp 221-- 222# 223# tld-local conversion test. 224# Convert U+0041 (A) to U+0061 (a) if TLD is "jp". 225# In a 'tld-local' line in the configuration file, use uppercase 226# letters to specify TLD. 227# 228 api: encodename 229 local_encoding: U-escape 230 conf: map tld-local 231 conf: tld-local JP @LOCALMAP_FILE1@ 232 localmap1: 0041; 0061; 233 from: ABC.jp 234 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 235 result: success 236 to: aBC.jp 237-- 238# 239# tld-local conversion test. 240# Convert U+0041 (A) to U+0061 (a) if TLD is "jp". 241# TLD of the input name is written in uppercase letters. 242# 243 api: encodename 244 local_encoding: U-escape 245 conf: map tld-local 246 conf: tld-local jp @LOCALMAP_FILE1@ 247 localmap1: 0041; 0061; 248 from: ABC.JP 249 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 250 result: success 251 to: aBC.JP 252-- 253# 254# tld-local conversion test. 255# Convert U+0041 (A) to U+0061 (a) if TLD is "jp". 256# The input name ends with ".". 257# 258 api: encodename 259 local_encoding: U-escape 260 conf: map tld-local 261 conf: tld-local jp @LOCALMAP_FILE1@ 262 localmap1: 0041; 0061; 263 from: ABC.jp. 264 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 265 result: success 266 to: aBC.jp. 267-- 268# 269# tld-local conversion test. 270# Convert U+004A (J) to U+006A (J) if TLD is "jp". 271# The input name has only one label. idnkit doesn't convert the label 272# even if it matches TLD of 'tld-local'. 273# 274 api: encodename 275 local_encoding: U-escape 276 conf: map tld-local 277 conf: tld-local jp @LOCALMAP_FILE1@ 278 localmap1: 004A; 006A; 279 from: JP 280 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 281 result: success 282 to: JP 283-- 284# 285# tld-local conversion test. 286# Convert U+004A (J) to U+006A (J) if TLD is missing. 287# 288 api: encodename 289 local_encoding: U-escape 290 conf: map tld-local 291 conf: tld-local - @LOCALMAP_FILE1@ 292 localmap1: 004A; 006A; 293 from: JP 294 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 295 result: success 296 to: jP 297-- 298# 299# tld-local conversion test. 300# Convert U+004A (J) to U+006A (J) if TLD is missing. 301# TLD of 'ltld-local' line is ".-". 302# 303 api: encodename 304 local_encoding: U-escape 305 conf: map tld-local 306 conf: tld-local .- @LOCALMAP_FILE1@ 307 localmap1: 004A; 006A; 308 from: JP 309 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 310 result: success 311 to: jP 312-- 313# 314# tld-local conversion test. 315# It defines tld-local conversion for "jp" domain, but TLD of 316# the input name is "ABC.org". No tld-local conversion occurs. 317# 318 api: encodename 319 local_encoding: U-escape 320 conf: map tld-local 321 conf: tld-local jp @LOCALMAP_FILE1@ 322 localmap1: 0041; 0061; 323 from: ABC.org 324 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 325 result: success 326 to: ABC.org 327-- 328# 329# tld-local conversion test. 330# It defines tld-local conversion for "jp" and "org". 331# tld-local conversion for "org" must be chosen, because the input name 332# is "ABC.org". 333# 334 api: encodename 335 local_encoding: U-escape 336 conf: map tld-local 337 conf: tld-local jp @LOCALMAP_FILE1@ 338 conf: tld-local org @LOCALMAP_FILE2@ 339 localmap1: 0041; 0061; 340 localmap2: 0042; 0062; 341 from: ABC.org 342 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 343 result: success 344 to: AbC.org 345-- 346# 347# tld-local conversion test. 348# It defines tld-local conversion for "jp" and "*" (default). 349# tld-local conversion for "org" must be chosen, because the input name 350# is "ABC.org". 351# 352 api: encodename 353 local_encoding: U-escape 354 conf: map tld-local 355 conf: tld-local jp @LOCALMAP_FILE1@ 356 conf: tld-local * @LOCALMAP_FILE2@ 357 localmap1: 0041; 0061; 358 localmap2: 0042; 0062; 359 from: ABC.org 360 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 361 result: success 362 to: AbC.org 363-- 364# 365# tld-local conversion test. 366# TLD in 'tld-local' line is ".*". 367# 368 api: encodename 369 local_encoding: U-escape 370 conf: map tld-local 371 conf: tld-local .* @LOCALMAP_FILE1@ 372 localmap1: 0041; 0061; 373 from: aBC.org 374 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 375 result: success 376 to: aBC.org 377-- 378# 379# tld-local conversion test. 380# It defines tld-local convresion, but the specified map file is empty. 381# 382 api: encodename 383 local_encoding: U-escape 384 conf: map tld-local 385 conf: tld-local jp @LOCALMAP_FILE1@ 386 localmap1: 387 from: ABC.jp 388 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 389 result: success 390 to: ABC.jp 391-- 392# 393# tld-local conversion test. 394# No 'tld-local' line in the configuration file. 395# 396 api: encodename 397 local_encoding: U-escape 398 conf: map tld-local 399 from: ABC.jp 400 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 401 result: success 402 to: ABC.jp 403-- 404# 405# tld-local conversion test. 406# Convert "". 407# 408 api: encodename 409 local_encoding: U-escape 410 conf: map tld-local 411 conf: tld-local jp @LOCALMAP_FILE1@ 412 localmap1: 0041; 0061; 413 from: 414 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 415 result: success 416 to: 417-- 418# 419# tld-local conversion test. 420# Convert U+0041 (A) to an empty. 421# 422 api: encodename 423 local_encoding: U-escape 424 conf: map tld-local 425 conf: tld-local jp @LOCALMAP_FILE1@ 426 localmap1: 0041; 427 from: ABC.jp 428 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 429 result: success 430 to: BC.jp 431-- 432# 433# tld-local conversion test. 434# Convert U+0041 (A) to U+0041 U+0041 U+0041 "AAA". 435# 436 api: encodename 437 local_encoding: U-escape 438 conf: map tld-local 439 conf: tld-local jp @LOCALMAP_FILE1@ 440 localmap1: 0041; 0041 0041 0041; 441 from: ABC.jp 442 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 443 result: success 444 to: AAABC.jp 445-- 446###################################################################### 447# Tests for parsing a configuration file. 448###################################################################### 449-- 450# 451# tld-local conversion test. 452# It defines 'tld-local' but no argument follows. 453# 454 api: encodename 455 local_encoding: U-escape 456 conf: map tld-local 457 conf: tld-local 458 localmap1: 0041; 0061; 459 from: ABC.jp 460 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 461 result: idn_resconf_loadfile() ERROR: syntax error 462 to: 463-- 464# 465# tld-local conversion test. 466# It defines 'tld-local' but it lacks an argument. 467# 468 api: encodename 469 local_encoding: U-escape 470 conf: map tld-local 471 conf: tld-local jp 472 localmap1: 0041; 0061; 473 from: ABC.jp 474 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 475 result: idn_resconf_loadfile() ERROR: syntax error 476 to: 477-- 478# 479# tld-local conversion test. 480# It defines 'tld-local' but it has an extra argument. 481# 482 api: encodename 483 local_encoding: U-escape 484 conf: map tld-local 485 conf: tld-local jp @LOCALMAP_FILE1@ yeah 486 localmap1: 0041; 0061; 487 from: ABC.jp 488 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 489 result: idn_resconf_loadfile() ERROR: no such file 490 to: 491-- 492# 493# tld-local conversion test. 494# It defines 'tld-local', but the specified map file doesn't exist. 495# 496 api: encodename 497 local_encoding: U-escape 498 conf: map tld-local 499 conf: tld-local jp @LOCALMAP_FILE1@ 500 from: ABC.jp 501 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 502 result: idn_resconf_loadfile() ERROR: no such file 503 to: 504-- 505# 506# tld-local conversion test. 507# It defines 'tld-local' for Japanese (ja) twice. 508# 509 api: encodename 510 local_encoding: U-escape 511 conf: map tld-local 512 conf: tld-local jp @LOCALMAP_FILE1@ 513 conf: tld-local JP @LOCALMAP_FILE2@ 514 localmap1: 0041; 0061; 515 localmap2: 0042; 0062; 516 from: ABC.jp 517 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 518 result: success 519 to: AbC.jp 520-- 521# 522# tld-local conversion test. 523# It defines 'tld-local', but 'tld-local' is not specified 524# in 'map'. 525# 526 api: encodename 527 local_encoding: U-escape 528 conf: map 529 conf: tld-local jp @LOCALMAP_FILE1@ 530 localmap1: 0041; 0061; 531 from: ABC.jp 532 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 533 result: success 534 to: ABC.jp 535-- 536# 537# tld-local conversion test. 538# It defines 'tld-local' for "*" (default) twice. 539# 540 api: encodename 541 local_encoding: U-escape 542 conf: map tld-local 543 conf: tld-local * @LOCALMAP_FILE1@ 544 conf: tld-local * @LOCALMAP_FILE2@ 545 localmap1: 0041; 0061; 546 localmap2: 0042; 0062; 547 from: ABC.jp 548 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 549 result: success 550 to: AbC.jp 551-- 552# 553# tld-local conversion test. 554# For backward combility, idnkit allows to place 'filemap:' prefix 555# in front of the localmap filename. 556# 557 api: encodename 558 local_encoding: U-escape 559 conf: language ja 560 conf: map tld-local 561 conf: tld-local * filemap:@LOCALMAP_FILE1@ 562 localmap1: 0041; 0061; 563 from: ABC.jp 564 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 565 result: success 566 to: aBC.jp 567-- 568# 569# tld-local conversion test. 570# TLD in the 'tld-local' line is ".". 571# 572 api: encodename 573 local_encoding: U-escape 574 conf: language ja 575 conf: map tld-local 576 conf: tld-local . @LOCALMAP_FILE1@ 577 localmap1: 0041; 0061; 578 from: ABC.jp 579 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 580 result: idn_resconf_loadfile() ERROR: syntax error 581 to: 582-- 583# 584# tld-local conversion test. 585# Use 'local-map' keyword instead of 'tld-loal'. 586# 587 api: encodename 588 local_encoding: U-escape 589 conf: map tld-local 590 conf: local-map * @LOCALMAP_FILE1@ 591 localmap1: 0041; 0061; 592 from: ABC.jp 593 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 594 result: success 595 to: aBC.jp 596-- 597###################################################################### 598# Tests for parsing a map file. 599###################################################################### 600-- 601# 602# tld-local conversion test. 603# A line in a map file has only one field. 604# 605 api: encodename 606 local_encoding: U-escape 607 conf: map tld-local 608 conf: tld-local * @LOCALMAP_FILE1@ 609 localmap1: 0041; 610 from: ABC.jp 611 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 612 result: success 613 to: BC.jp 614-- 615# 616# tld-local conversion test. 617# A line in a map file has a comment ("#..."). 618# 619 api: encodename 620 local_encoding: U-escape 621 conf: map tld-local 622 conf: tld-local * @LOCALMAP_FILE1@ 623 localmap1: 0041; 0061 # A 624 from: ABC.jp 625 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 626 result: success 627 to: aBC.jp 628-- 629# 630# tld-local conversion test. 631# A line in a map file has an extra field (ignored). 632# 633 api: encodename 634 local_encoding: U-escape 635 conf: map tld-local 636 conf: tld-local * @LOCALMAP_FILE1@ 637 localmap1: 0041; 0061; yeah 638 from: ABC.jp 639 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 640 result: success 641 to: aBC.jp 642-- 643# 644# tld-local conversion test. 645# A line in a map file, code points don't have zero prefixes. 646# 647 api: encodename 648 local_encoding: U-escape 649 conf: map tld-local 650 conf: tld-local * @LOCALMAP_FILE1@ 651 localmap1: 41; 61; 652 from: ABC.jp 653 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 654 result: success 655 to: aBC.jp 656-- 657# 658# tld-local conversion test. 659# A line in a map file, code points have 'U+' prefixes. 660# 661 api: encodename 662 local_encoding: U-escape 663 conf: map tld-local 664 conf: tld-local * @LOCALMAP_FILE1@ 665 localmap1: U+0041; U+0061; 666 from: ABC.jp 667 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 668 result: success 669 to: aBC.jp 670-- 671# 672# tld-local conversion test. 673# The map file has an empty line. 674# 675 api: encodename 676 local_encoding: U-escape 677 conf: map tld-local 678 conf: tld-local * @LOCALMAP_FILE1@ 679 localmap1: 680 localmap1: 41; 61; 681 from: ABC.jp 682 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 683 result: success 684 to: aBC.jp 685-- 686# 687# tld-local conversion test. 688# The map file has a comment line. 689# 690 api: encodename 691 local_encoding: U-escape 692 conf: map tld-local 693 conf: tld-local * @LOCALMAP_FILE1@ 694 localmap1: # 695 localmap1: 41; 61; 696 from: ABC.jp 697 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 698 result: success 699 to: aBC.jp 700-- 701# 702# tld-local conversion test. 703# The map file defines a map for U+0000. 704# 705 api: encodename 706 local_encoding: U-escape 707 conf: map tld-local 708 conf: tld-local * @LOCALMAP_FILE1@ 709 localmap1: 0000; 0041; 710 from: ABC.jp 711 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 712 result: idn_resconf_loadfile() ERROR: invalid code point 713 to: 714-- 715# 716# tld-local conversion test. 717# The map file defines a map for U+D7FF. 718# 719 api: encodename 720 local_encoding: U-escape 721 conf: map tld-local 722 conf: tld-local * @LOCALMAP_FILE1@ 723 localmap1: D7FF; 0041; 724 from: \u{d7ff}BC.jp 725 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 726 result: success 727 to: ABC.jp 728-- 729# 730# tld-local conversion test. 731# The map file defines a map for U+D800 (used for surrogate pair). 732# 733 api: encodename 734 local_encoding: U-escape 735 conf: map tld-local 736 conf: tld-local * @LOCALMAP_FILE1@ 737 localmap1: D800; 0041; 738 from: \u{d800}BC.jp 739 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 740 result: idn_resconf_loadfile() ERROR: invalid code point 741 to: 742-- 743# 744# tld-local conversion test. 745# The map file defines a map for U+DFFF (used for surrogate pair). 746# 747 api: encodename 748 local_encoding: U-escape 749 conf: map tld-local 750 conf: tld-local * @LOCALMAP_FILE1@ 751 localmap1: D800; 0041; 752 from: \u{dfff}BC.jp 753 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 754 result: idn_resconf_loadfile() ERROR: invalid code point 755 to: 756-- 757# 758# tld-local conversion test. 759# The map file defines a map for U+E000. 760# 761 api: encodename 762 local_encoding: U-escape 763 conf: map tld-local 764 conf: tld-local * @LOCALMAP_FILE1@ 765 localmap1: E000; 0041; 766 from: \u{e000}BC.jp 767 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 768 result: success 769 to: ABC.jp 770-- 771# 772# tld-local conversion test. 773# The map file defines a map for U+10FFFF. 774# 775 api: encodename 776 local_encoding: U-escape 777 conf: map tld-local 778 conf: tld-local * @LOCALMAP_FILE1@ 779 localmap1: 10FFFF; 0041; 780 from: \u{10ffff}BC.jp 781 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 782 result: success 783 to: ABC.jp 784-- 785# 786# tld-local conversion test. 787# The map file defines a map for U+110000. 788# 789 api: encodename 790 local_encoding: U-escape 791 conf: map tld-local 792 conf: tld-local * @LOCALMAP_FILE1@ 793 localmap1: 110000; 0041; 794 from: \u{110000}BC.jp 795 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 796 result: idn_resconf_loadfile() ERROR: invalid code point 797 to: 798-- 799# 800# tld-local conversion test. 801# The map file defines a map for "XXXX" (not code point). 802# 803 api: encodename 804 local_encoding: U-escape 805 conf: map tld-local 806 conf: tld-local * @LOCALMAP_FILE1@ 807 localmap1: XXXX; 0041; 808 from: ABC.jp 809 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 810 result: idn_resconf_loadfile() ERROR: syntax error 811 to: 812-- 813# 814# tld-local conversion test. 815# The map result contains U+0000. 816# 817 api: encodename 818 local_encoding: U-escape 819 conf: map tld-local 820 conf: tld-local * @LOCALMAP_FILE1@ 821 localmap1: 0041; 0000; 822 from: ABC.jp 823 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 824 result: idn_resconf_loadfile() ERROR: invalid code point 825 to: 826-- 827# 828# tld-local conversion test. 829# The map result contains U+D7FF. 830# 831 api: encodename 832 local_encoding: U-escape 833 conf: map tld-local 834 conf: tld-local * @LOCALMAP_FILE1@ 835 localmap1: 0041; D7FF; 836 from: ABC.jp 837 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 838 result: success 839 to: \u{d7ff}BC.jp 840-- 841# 842# tld-local conversion test. 843# The map result contains U+D800 (used for surrogate pair). 844# 845 api: encodename 846 local_encoding: U-escape 847 conf: map tld-local 848 conf: tld-local * @LOCALMAP_FILE1@ 849 localmap1: 0041; D800; 850 from: ABC.jp 851 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 852 result: idn_resconf_loadfile() ERROR: invalid code point 853 to: 854-- 855# 856# tld-local conversion test. 857# The map result contains U+DFFF (used for surrogate pair). 858# 859 api: encodename 860 local_encoding: U-escape 861 conf: map tld-local 862 conf: tld-local * @LOCALMAP_FILE1@ 863 localmap1: 0041; D800; 864 from: ABC.jp 865 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 866 result: idn_resconf_loadfile() ERROR: invalid code point 867 to: 868-- 869# 870# tld-local conversion test. 871# The map result contains U+E000. 872# 873 api: encodename 874 local_encoding: U-escape 875 conf: map tld-local 876 conf: tld-local * @LOCALMAP_FILE1@ 877 localmap1: 0041; E000; 878 from: ABC.jp 879 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 880 result: success 881 to: \u{e000}BC.jp 882-- 883# 884# tld-local conversion test. 885# The map result contains U+10FFFF. 886# 887 api: encodename 888 local_encoding: U-escape 889 conf: map tld-local 890 conf: tld-local * @LOCALMAP_FILE1@ 891 localmap1: 0041; 10FFFF; 892 from: ABC.jp 893 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 894 result: success 895 to: \u{10ffff}BC.jp 896-- 897# 898# tld-local conversion test. 899# The map result contains U+110000. 900# 901 api: encodename 902 local_encoding: U-escape 903 conf: map tld-local 904 conf: tld-local * @LOCALMAP_FILE1@ 905 localmap1: 0041; 110000; 906 from: ABC.jp 907 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 908 result: idn_resconf_loadfile() ERROR: invalid code point 909 to: 910-- 911# 912# tld-local conversion test. 913# The map result contains "XXXX" (not code point). 914# 915 api: encodename 916 local_encoding: U-escape 917 conf: map tld-local 918 conf: tld-local * @LOCALMAP_FILE1@ 919 localmap1: 0041; XXXX; 920 from: ABC.jp 921 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 922 result: idn_resconf_loadfile() ERROR: syntax error 923 to: 924-- 925# 926# tld-local conversion test. 927# The map file lacks newline character at EOF. 928# 929 api: encodename 930 local_encoding: U-escape 931 conf: map tld-local 932 conf: tld-local * @LOCALMAP_FILE1@ 933 post_setup: cp $SRCDIR/no-newline.map @LOCALMAP_FILE1@ 934 from: ABC.jp 935 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 936 result: success 937 to: aBC.jp 938-- 939# 940# tld-local conversion test. 941# Too long line in a map file. 942# 943 api: encodename 944 local_encoding: U-escape 945 conf: map tld-local 946 conf: tld-local * @LOCALMAP_FILE1@ 947 localmap1: # **************************************************************************************************************************************************************************************************************************************************************************************************************************** 948 from: ABC.jp 949 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 950 result: idn_resconf_loadfile() ERROR: syntax error 951 to: 952-- 953###################################################################### 954# Tests using decodename. 955###################################################################### 956-- 957# 958# tld-local conversion test. 959# Convert U+0041 (A) to U+0061 (a) when the current tld is Japanese. 960# 961 api: decodename 962 local_encoding: U-escape 963 conf: map tld-local 964 conf: tld-local jp @LOCALMAP_FILE1@ 965 localmap1: 0041; 0061; 966 from: ABC.jp 967 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 968 result: success 969 to: aBC.jp 970-- 971# 972# tld-local conversion test. 973# Convert "". 974# 975 api: decodename 976 local_encoding: U-escape 977 conf: map tld-local 978 conf: tld-local jp @LOCALMAP_FILE1@ 979 localmap1: 0041; 0061; 980 from: 981 actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV 982 result: success 983 to: 984-- 985