1===== Conversion of a one-byte character ===== 2 3----- Valid characters ----- 4UTF8: 00 7f 01 10 7e 5d 5UTF16: 0000 007f 0001 0010 007e 005d 6 cc = 0 7 dst address difference: 12 dst len: 1988 8 src address difference: 6 src len: 0 9 10----- Invalid characters ----- 11UTF8: 80 12UTF16: <none> 13 cc = 2 14 dst address difference: 0 dst len: 2000 15 src address difference: 0 src len: 1 16UTF8: bf 17UTF16: <none> 18 cc = 2 19 dst address difference: 0 dst len: 2000 20 src address difference: 0 src len: 1 21UTF8: f8 22UTF16: <none> 23 cc = 2 24 dst address difference: 0 dst len: 2000 25 src address difference: 0 src len: 1 26UTF8: ff 27UTF16: <none> 28 cc = 2 29 dst address difference: 0 dst len: 2000 30 src address difference: 0 src len: 1 31UTF8: 81 32UTF16: <none> 33 cc = 2 34 dst address difference: 0 dst len: 2000 35 src address difference: 0 src len: 1 36UTF8: be 37UTF16: <none> 38 cc = 2 39 dst address difference: 0 dst len: 2000 40 src address difference: 0 src len: 1 41UTF8: 95 42UTF16: <none> 43 cc = 2 44 dst address difference: 0 dst len: 2000 45 src address difference: 0 src len: 1 46UTF8: ab 47UTF16: <none> 48 cc = 2 49 dst address difference: 0 dst len: 2000 50 src address difference: 0 src len: 1 51 52----- Invalid characters if m3 == 1 ----- 53UTF8: c0 54UTF16: <none> 55 cc = 0 56 dst address difference: 0 dst len: 2000 57 src address difference: 0 src len: 1 58UTF8: c1 59UTF16: <none> 60 cc = 0 61 dst address difference: 0 dst len: 2000 62 src address difference: 0 src len: 1 63UTF8: f5 64UTF16: <none> 65 cc = 0 66 dst address difference: 0 dst len: 2000 67 src address difference: 0 src len: 1 68UTF8: f6 69UTF16: <none> 70 cc = 0 71 dst address difference: 0 dst len: 2000 72 src address difference: 0 src len: 1 73UTF8: f7 74UTF16: <none> 75 cc = 0 76 dst address difference: 0 dst len: 2000 77 src address difference: 0 src len: 1 78 79----- 1st char valid, 2nd char invalid ----- 80UTF8: 10 aa 81UTF16: 0010 82 cc = 2 83 dst address difference: 2 dst len: 1998 84 src address difference: 1 src len: 1 85 86===== Conversion of a two-byte character ===== 87 88----- Valid characters ----- 89UTF8: c2 80 c2 bf df 80 df bf c3 be da bc 90UTF16: 0080 00bf 07c0 07ff 00fe 06bc 91 cc = 0 92 dst address difference: 12 dst len: 1988 93 src address difference: 12 src len: 0 94 95----- Valid characters if m3 == 0 ----- 96UTF8: c0 80 c0 bf c1 80 c0 bf 97UTF16: 0000 003f 0040 003f 98 cc = 0 99 dst address difference: 8 dst len: 1992 100 src address difference: 8 src len: 0 101 102----- Invalid characters if m3 == 1 ----- 103UTF8: c2 00 104UTF16: 0080 105 cc = 0 106 dst address difference: 2 dst len: 1998 107 src address difference: 2 src len: 0 108UTF8: c2 7f 109UTF16: 00bf 110 cc = 0 111 dst address difference: 2 dst len: 1998 112 src address difference: 2 src len: 0 113UTF8: c2 c0 114UTF16: 0080 115 cc = 0 116 dst address difference: 2 dst len: 1998 117 src address difference: 2 src len: 0 118UTF8: c2 ff 119UTF16: 00bf 120 cc = 0 121 dst address difference: 2 dst len: 1998 122 src address difference: 2 src len: 0 123 124----- 1st char valid, 2nd char invalid ----- 125UTF8: c3 81 c4 00 126UTF16: 00c1 0100 127 cc = 0 128 dst address difference: 4 dst len: 1996 129 src address difference: 4 src len: 0 130 131===== Conversion of a three-byte character ===== 132 133----- Valid characters ----- 134UTF8: e0 a0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb 135UTF16: 0800 0fc0 083f 0fff 0abb 136 cc = 0 137 dst address difference: 10 dst len: 1990 138 src address difference: 15 src len: 0 139UTF8: ed 80 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb 140UTF16: d000 d7c0 d03f d7ff d2bb 141 cc = 0 142 dst address difference: 10 dst len: 1990 143 src address difference: 15 src len: 0 144UTF8: e1 80 80 145UTF16: 1000 146 cc = 0 147 dst address difference: 2 dst len: 1998 148 src address difference: 3 src len: 0 149UTF8: e1 bf 80 150UTF16: 1fc0 151 cc = 0 152 dst address difference: 2 dst len: 1998 153 src address difference: 3 src len: 0 154UTF8: e1 80 bf 155UTF16: 103f 156 cc = 0 157 dst address difference: 2 dst len: 1998 158 src address difference: 3 src len: 0 159UTF8: e1 bf bf 160UTF16: 1fff 161 cc = 0 162 dst address difference: 2 dst len: 1998 163 src address difference: 3 src len: 0 164UTF8: e2 80 80 165UTF16: 2000 166 cc = 0 167 dst address difference: 2 dst len: 1998 168 src address difference: 3 src len: 0 169UTF8: e2 bf 80 170UTF16: 2fc0 171 cc = 0 172 dst address difference: 2 dst len: 1998 173 src address difference: 3 src len: 0 174UTF8: e2 80 bf 175UTF16: 203f 176 cc = 0 177 dst address difference: 2 dst len: 1998 178 src address difference: 3 src len: 0 179UTF8: e2 bf bf 180UTF16: 2fff 181 cc = 0 182 dst address difference: 2 dst len: 1998 183 src address difference: 3 src len: 0 184UTF8: e3 80 80 185UTF16: 3000 186 cc = 0 187 dst address difference: 2 dst len: 1998 188 src address difference: 3 src len: 0 189UTF8: e3 bf 80 190UTF16: 3fc0 191 cc = 0 192 dst address difference: 2 dst len: 1998 193 src address difference: 3 src len: 0 194UTF8: e3 80 bf 195UTF16: 303f 196 cc = 0 197 dst address difference: 2 dst len: 1998 198 src address difference: 3 src len: 0 199UTF8: e3 bf bf 200UTF16: 3fff 201 cc = 0 202 dst address difference: 2 dst len: 1998 203 src address difference: 3 src len: 0 204UTF8: e4 80 80 205UTF16: 4000 206 cc = 0 207 dst address difference: 2 dst len: 1998 208 src address difference: 3 src len: 0 209UTF8: e4 bf 80 210UTF16: 4fc0 211 cc = 0 212 dst address difference: 2 dst len: 1998 213 src address difference: 3 src len: 0 214UTF8: e4 80 bf 215UTF16: 403f 216 cc = 0 217 dst address difference: 2 dst len: 1998 218 src address difference: 3 src len: 0 219UTF8: e4 bf bf 220UTF16: 4fff 221 cc = 0 222 dst address difference: 2 dst len: 1998 223 src address difference: 3 src len: 0 224UTF8: e5 80 80 225UTF16: 5000 226 cc = 0 227 dst address difference: 2 dst len: 1998 228 src address difference: 3 src len: 0 229UTF8: e5 bf 80 230UTF16: 5fc0 231 cc = 0 232 dst address difference: 2 dst len: 1998 233 src address difference: 3 src len: 0 234UTF8: e5 80 bf 235UTF16: 503f 236 cc = 0 237 dst address difference: 2 dst len: 1998 238 src address difference: 3 src len: 0 239UTF8: e5 bf bf 240UTF16: 5fff 241 cc = 0 242 dst address difference: 2 dst len: 1998 243 src address difference: 3 src len: 0 244UTF8: e6 80 80 245UTF16: 6000 246 cc = 0 247 dst address difference: 2 dst len: 1998 248 src address difference: 3 src len: 0 249UTF8: e6 bf 80 250UTF16: 6fc0 251 cc = 0 252 dst address difference: 2 dst len: 1998 253 src address difference: 3 src len: 0 254UTF8: e6 80 bf 255UTF16: 603f 256 cc = 0 257 dst address difference: 2 dst len: 1998 258 src address difference: 3 src len: 0 259UTF8: e6 bf bf 260UTF16: 6fff 261 cc = 0 262 dst address difference: 2 dst len: 1998 263 src address difference: 3 src len: 0 264UTF8: e7 80 80 265UTF16: 7000 266 cc = 0 267 dst address difference: 2 dst len: 1998 268 src address difference: 3 src len: 0 269UTF8: e7 bf 80 270UTF16: 7fc0 271 cc = 0 272 dst address difference: 2 dst len: 1998 273 src address difference: 3 src len: 0 274UTF8: e7 80 bf 275UTF16: 703f 276 cc = 0 277 dst address difference: 2 dst len: 1998 278 src address difference: 3 src len: 0 279UTF8: e7 bf bf 280UTF16: 7fff 281 cc = 0 282 dst address difference: 2 dst len: 1998 283 src address difference: 3 src len: 0 284UTF8: e8 80 80 285UTF16: 8000 286 cc = 0 287 dst address difference: 2 dst len: 1998 288 src address difference: 3 src len: 0 289UTF8: e8 bf 80 290UTF16: 8fc0 291 cc = 0 292 dst address difference: 2 dst len: 1998 293 src address difference: 3 src len: 0 294UTF8: e8 80 bf 295UTF16: 803f 296 cc = 0 297 dst address difference: 2 dst len: 1998 298 src address difference: 3 src len: 0 299UTF8: e8 bf bf 300UTF16: 8fff 301 cc = 0 302 dst address difference: 2 dst len: 1998 303 src address difference: 3 src len: 0 304UTF8: e9 80 80 305UTF16: 9000 306 cc = 0 307 dst address difference: 2 dst len: 1998 308 src address difference: 3 src len: 0 309UTF8: e9 bf 80 310UTF16: 9fc0 311 cc = 0 312 dst address difference: 2 dst len: 1998 313 src address difference: 3 src len: 0 314UTF8: e9 80 bf 315UTF16: 903f 316 cc = 0 317 dst address difference: 2 dst len: 1998 318 src address difference: 3 src len: 0 319UTF8: e9 bf bf 320UTF16: 9fff 321 cc = 0 322 dst address difference: 2 dst len: 1998 323 src address difference: 3 src len: 0 324UTF8: ea 80 80 325UTF16: a000 326 cc = 0 327 dst address difference: 2 dst len: 1998 328 src address difference: 3 src len: 0 329UTF8: ea bf 80 330UTF16: afc0 331 cc = 0 332 dst address difference: 2 dst len: 1998 333 src address difference: 3 src len: 0 334UTF8: ea 80 bf 335UTF16: a03f 336 cc = 0 337 dst address difference: 2 dst len: 1998 338 src address difference: 3 src len: 0 339UTF8: ea bf bf 340UTF16: afff 341 cc = 0 342 dst address difference: 2 dst len: 1998 343 src address difference: 3 src len: 0 344UTF8: eb 80 80 345UTF16: b000 346 cc = 0 347 dst address difference: 2 dst len: 1998 348 src address difference: 3 src len: 0 349UTF8: eb bf 80 350UTF16: bfc0 351 cc = 0 352 dst address difference: 2 dst len: 1998 353 src address difference: 3 src len: 0 354UTF8: eb 80 bf 355UTF16: b03f 356 cc = 0 357 dst address difference: 2 dst len: 1998 358 src address difference: 3 src len: 0 359UTF8: eb bf bf 360UTF16: bfff 361 cc = 0 362 dst address difference: 2 dst len: 1998 363 src address difference: 3 src len: 0 364UTF8: ec 80 80 365UTF16: c000 366 cc = 0 367 dst address difference: 2 dst len: 1998 368 src address difference: 3 src len: 0 369UTF8: ec bf 80 370UTF16: cfc0 371 cc = 0 372 dst address difference: 2 dst len: 1998 373 src address difference: 3 src len: 0 374UTF8: ec 80 bf 375UTF16: c03f 376 cc = 0 377 dst address difference: 2 dst len: 1998 378 src address difference: 3 src len: 0 379UTF8: ec bf bf 380UTF16: cfff 381 cc = 0 382 dst address difference: 2 dst len: 1998 383 src address difference: 3 src len: 0 384UTF8: ee 80 80 385UTF16: e000 386 cc = 0 387 dst address difference: 2 dst len: 1998 388 src address difference: 3 src len: 0 389UTF8: ee bf 80 390UTF16: efc0 391 cc = 0 392 dst address difference: 2 dst len: 1998 393 src address difference: 3 src len: 0 394UTF8: ee 80 bf 395UTF16: e03f 396 cc = 0 397 dst address difference: 2 dst len: 1998 398 src address difference: 3 src len: 0 399UTF8: ee bf bf 400UTF16: efff 401 cc = 0 402 dst address difference: 2 dst len: 1998 403 src address difference: 3 src len: 0 404UTF8: ef 80 80 405UTF16: f000 406 cc = 0 407 dst address difference: 2 dst len: 1998 408 src address difference: 3 src len: 0 409UTF8: ef bf 80 410UTF16: ffc0 411 cc = 0 412 dst address difference: 2 dst len: 1998 413 src address difference: 3 src len: 0 414UTF8: ef 80 bf 415UTF16: f03f 416 cc = 0 417 dst address difference: 2 dst len: 1998 418 src address difference: 3 src len: 0 419UTF8: ef bf bf 420UTF16: ffff 421 cc = 0 422 dst address difference: 2 dst len: 1998 423 src address difference: 3 src len: 0 424 425----- Invalid characters (2nd byte is invalid) ----- 426UTF8: e0 9f 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb 427UTF16: 07c0 0fc0 083f 0fff 0abb 428 cc = 0 429 dst address difference: 10 dst len: 1990 430 src address difference: 15 src len: 0 431UTF8: e0 c0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb 432UTF16: 0000 0fc0 083f 0fff 0abb 433 cc = 0 434 dst address difference: 10 dst len: 1990 435 src address difference: 15 src len: 0 436UTF8: ed 7f 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb 437UTF16: dfc0 d7c0 d03f d7ff d2bb 438 cc = 0 439 dst address difference: 10 dst len: 1990 440 src address difference: 15 src len: 0 441UTF8: ed a0 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb 442UTF16: d800 d7c0 d03f d7ff d2bb 443 cc = 0 444 dst address difference: 10 dst len: 1990 445 src address difference: 15 src len: 0 446UTF8: e1 7f 80 447UTF16: 1fc0 448 cc = 0 449 dst address difference: 2 dst len: 1998 450 src address difference: 3 src len: 0 451UTF8: e1 c0 80 452UTF16: 1000 453 cc = 0 454 dst address difference: 2 dst len: 1998 455 src address difference: 3 src len: 0 456UTF8: e2 7f 80 457UTF16: 2fc0 458 cc = 0 459 dst address difference: 2 dst len: 1998 460 src address difference: 3 src len: 0 461UTF8: e2 c0 80 462UTF16: 2000 463 cc = 0 464 dst address difference: 2 dst len: 1998 465 src address difference: 3 src len: 0 466UTF8: e3 7f 80 467UTF16: 3fc0 468 cc = 0 469 dst address difference: 2 dst len: 1998 470 src address difference: 3 src len: 0 471UTF8: e3 c0 80 472UTF16: 3000 473 cc = 0 474 dst address difference: 2 dst len: 1998 475 src address difference: 3 src len: 0 476UTF8: e4 7f 80 477UTF16: 4fc0 478 cc = 0 479 dst address difference: 2 dst len: 1998 480 src address difference: 3 src len: 0 481UTF8: e4 c0 80 482UTF16: 4000 483 cc = 0 484 dst address difference: 2 dst len: 1998 485 src address difference: 3 src len: 0 486UTF8: e5 7f 80 487UTF16: 5fc0 488 cc = 0 489 dst address difference: 2 dst len: 1998 490 src address difference: 3 src len: 0 491UTF8: e5 c0 80 492UTF16: 5000 493 cc = 0 494 dst address difference: 2 dst len: 1998 495 src address difference: 3 src len: 0 496UTF8: e6 7f 80 497UTF16: 6fc0 498 cc = 0 499 dst address difference: 2 dst len: 1998 500 src address difference: 3 src len: 0 501UTF8: e6 c0 80 502UTF16: 6000 503 cc = 0 504 dst address difference: 2 dst len: 1998 505 src address difference: 3 src len: 0 506UTF8: e7 7f 80 507UTF16: 7fc0 508 cc = 0 509 dst address difference: 2 dst len: 1998 510 src address difference: 3 src len: 0 511UTF8: e7 c0 80 512UTF16: 7000 513 cc = 0 514 dst address difference: 2 dst len: 1998 515 src address difference: 3 src len: 0 516UTF8: e8 7f 80 517UTF16: 8fc0 518 cc = 0 519 dst address difference: 2 dst len: 1998 520 src address difference: 3 src len: 0 521UTF8: e8 c0 80 522UTF16: 8000 523 cc = 0 524 dst address difference: 2 dst len: 1998 525 src address difference: 3 src len: 0 526UTF8: e9 7f 80 527UTF16: 9fc0 528 cc = 0 529 dst address difference: 2 dst len: 1998 530 src address difference: 3 src len: 0 531UTF8: e9 c0 80 532UTF16: 9000 533 cc = 0 534 dst address difference: 2 dst len: 1998 535 src address difference: 3 src len: 0 536UTF8: ea 7f 80 537UTF16: afc0 538 cc = 0 539 dst address difference: 2 dst len: 1998 540 src address difference: 3 src len: 0 541UTF8: ea c0 80 542UTF16: a000 543 cc = 0 544 dst address difference: 2 dst len: 1998 545 src address difference: 3 src len: 0 546UTF8: eb 7f 80 547UTF16: bfc0 548 cc = 0 549 dst address difference: 2 dst len: 1998 550 src address difference: 3 src len: 0 551UTF8: eb c0 80 552UTF16: b000 553 cc = 0 554 dst address difference: 2 dst len: 1998 555 src address difference: 3 src len: 0 556UTF8: ec 7f 80 557UTF16: cfc0 558 cc = 0 559 dst address difference: 2 dst len: 1998 560 src address difference: 3 src len: 0 561UTF8: ec c0 80 562UTF16: c000 563 cc = 0 564 dst address difference: 2 dst len: 1998 565 src address difference: 3 src len: 0 566UTF8: ee 7f 80 567UTF16: efc0 568 cc = 0 569 dst address difference: 2 dst len: 1998 570 src address difference: 3 src len: 0 571UTF8: ee c0 80 572UTF16: e000 573 cc = 0 574 dst address difference: 2 dst len: 1998 575 src address difference: 3 src len: 0 576UTF8: ef 7f 80 577UTF16: ffc0 578 cc = 0 579 dst address difference: 2 dst len: 1998 580 src address difference: 3 src len: 0 581UTF8: ef c0 80 582UTF16: f000 583 cc = 0 584 dst address difference: 2 dst len: 1998 585 src address difference: 3 src len: 0 586 587----- Invalid characters (3rd byte is invalid) ----- 588UTF8: e0 ab 7f 589UTF16: 0aff 590 cc = 0 591 dst address difference: 2 dst len: 1998 592 src address difference: 3 src len: 0 593UTF8: e0 ab c0 594UTF16: 0ac0 595 cc = 0 596 dst address difference: 2 dst len: 1998 597 src address difference: 3 src len: 0 598UTF8: e1 ab 7f 599UTF16: 1aff 600 cc = 0 601 dst address difference: 2 dst len: 1998 602 src address difference: 3 src len: 0 603UTF8: e1 ab c0 604UTF16: 1ac0 605 cc = 0 606 dst address difference: 2 dst len: 1998 607 src address difference: 3 src len: 0 608UTF8: e2 ab 7f 609UTF16: 2aff 610 cc = 0 611 dst address difference: 2 dst len: 1998 612 src address difference: 3 src len: 0 613UTF8: e2 ab c0 614UTF16: 2ac0 615 cc = 0 616 dst address difference: 2 dst len: 1998 617 src address difference: 3 src len: 0 618UTF8: e3 ab 7f 619UTF16: 3aff 620 cc = 0 621 dst address difference: 2 dst len: 1998 622 src address difference: 3 src len: 0 623UTF8: e3 ab c0 624UTF16: 3ac0 625 cc = 0 626 dst address difference: 2 dst len: 1998 627 src address difference: 3 src len: 0 628UTF8: e4 ab 7f 629UTF16: 4aff 630 cc = 0 631 dst address difference: 2 dst len: 1998 632 src address difference: 3 src len: 0 633UTF8: e4 ab c0 634UTF16: 4ac0 635 cc = 0 636 dst address difference: 2 dst len: 1998 637 src address difference: 3 src len: 0 638UTF8: e5 ab 7f 639UTF16: 5aff 640 cc = 0 641 dst address difference: 2 dst len: 1998 642 src address difference: 3 src len: 0 643UTF8: e5 ab c0 644UTF16: 5ac0 645 cc = 0 646 dst address difference: 2 dst len: 1998 647 src address difference: 3 src len: 0 648UTF8: e6 ab 7f 649UTF16: 6aff 650 cc = 0 651 dst address difference: 2 dst len: 1998 652 src address difference: 3 src len: 0 653UTF8: e6 ab c0 654UTF16: 6ac0 655 cc = 0 656 dst address difference: 2 dst len: 1998 657 src address difference: 3 src len: 0 658UTF8: e7 ab 7f 659UTF16: 7aff 660 cc = 0 661 dst address difference: 2 dst len: 1998 662 src address difference: 3 src len: 0 663UTF8: e7 ab c0 664UTF16: 7ac0 665 cc = 0 666 dst address difference: 2 dst len: 1998 667 src address difference: 3 src len: 0 668UTF8: e8 ab 7f 669UTF16: 8aff 670 cc = 0 671 dst address difference: 2 dst len: 1998 672 src address difference: 3 src len: 0 673UTF8: e8 ab c0 674UTF16: 8ac0 675 cc = 0 676 dst address difference: 2 dst len: 1998 677 src address difference: 3 src len: 0 678UTF8: e9 ab 7f 679UTF16: 9aff 680 cc = 0 681 dst address difference: 2 dst len: 1998 682 src address difference: 3 src len: 0 683UTF8: e9 ab c0 684UTF16: 9ac0 685 cc = 0 686 dst address difference: 2 dst len: 1998 687 src address difference: 3 src len: 0 688UTF8: ea ab 7f 689UTF16: aaff 690 cc = 0 691 dst address difference: 2 dst len: 1998 692 src address difference: 3 src len: 0 693UTF8: ea ab c0 694UTF16: aac0 695 cc = 0 696 dst address difference: 2 dst len: 1998 697 src address difference: 3 src len: 0 698UTF8: eb ab 7f 699UTF16: baff 700 cc = 0 701 dst address difference: 2 dst len: 1998 702 src address difference: 3 src len: 0 703UTF8: eb ab c0 704UTF16: bac0 705 cc = 0 706 dst address difference: 2 dst len: 1998 707 src address difference: 3 src len: 0 708UTF8: ec ab 7f 709UTF16: caff 710 cc = 0 711 dst address difference: 2 dst len: 1998 712 src address difference: 3 src len: 0 713UTF8: ec ab c0 714UTF16: cac0 715 cc = 0 716 dst address difference: 2 dst len: 1998 717 src address difference: 3 src len: 0 718UTF8: ed ab 7f 719UTF16: daff 720 cc = 0 721 dst address difference: 2 dst len: 1998 722 src address difference: 3 src len: 0 723UTF8: ed ab c0 724UTF16: dac0 725 cc = 0 726 dst address difference: 2 dst len: 1998 727 src address difference: 3 src len: 0 728UTF8: ee ab 7f 729UTF16: eaff 730 cc = 0 731 dst address difference: 2 dst len: 1998 732 src address difference: 3 src len: 0 733UTF8: ee ab c0 734UTF16: eac0 735 cc = 0 736 dst address difference: 2 dst len: 1998 737 src address difference: 3 src len: 0 738UTF8: ef ab 7f 739UTF16: faff 740 cc = 0 741 dst address difference: 2 dst len: 1998 742 src address difference: 3 src len: 0 743UTF8: ef ab c0 744UTF16: fac0 745 cc = 0 746 dst address difference: 2 dst len: 1998 747 src address difference: 3 src len: 0 748 749----- Invalid 2nd char AND output exhausted ----- 750UTF8: e0 00 80 751UTF16: <none> 752 cc = 1 753 dst address difference: 0 dst len: 1 754 src address difference: 0 src len: 3 755 756----- Invalid 3rd char AND output exhausted ----- 757UTF8: e4 84 00 758UTF16: <none> 759 cc = 1 760 dst address difference: 0 dst len: 1 761 src address difference: 0 src len: 3 762 763----- 1st char valid, 2nd char invalid ----- 764UTF8: e1 90 90 e1 00 90 765UTF16: 1410 1010 766 cc = 0 767 dst address difference: 4 dst len: 1996 768 src address difference: 6 src len: 0 769 770===== Conversion of a four-byte character ===== 771 772----- Valid characters ----- 773UTF8: f0 90 80 80 774UTF16: d800 dc00 775 cc = 0 776 dst address difference: 4 dst len: 1996 777 src address difference: 4 src len: 0 778UTF8: f0 90 80 bf 779UTF16: d800 dc3f 780 cc = 0 781 dst address difference: 4 dst len: 1996 782 src address difference: 4 src len: 0 783UTF8: f0 90 bf 80 784UTF16: d803 dfc0 785 cc = 0 786 dst address difference: 4 dst len: 1996 787 src address difference: 4 src len: 0 788UTF8: f0 90 bf bf 789UTF16: d803 dfff 790 cc = 0 791 dst address difference: 4 dst len: 1996 792 src address difference: 4 src len: 0 793UTF8: f0 bf 80 80 794UTF16: d8bc dc00 795 cc = 0 796 dst address difference: 4 dst len: 1996 797 src address difference: 4 src len: 0 798UTF8: f0 bf 80 bf 799UTF16: d8bc dc3f 800 cc = 0 801 dst address difference: 4 dst len: 1996 802 src address difference: 4 src len: 0 803UTF8: f0 bf bf 80 804UTF16: d8bf dfc0 805 cc = 0 806 dst address difference: 4 dst len: 1996 807 src address difference: 4 src len: 0 808UTF8: f0 bf bf bf 809UTF16: d8bf dfff 810 cc = 0 811 dst address difference: 4 dst len: 1996 812 src address difference: 4 src len: 0 813UTF8: f1 80 80 80 814UTF16: d8c0 dc00 815 cc = 0 816 dst address difference: 4 dst len: 1996 817 src address difference: 4 src len: 0 818UTF8: f1 80 80 bf 819UTF16: d8c0 dc3f 820 cc = 0 821 dst address difference: 4 dst len: 1996 822 src address difference: 4 src len: 0 823UTF8: f1 80 bf 80 824UTF16: d8c3 dfc0 825 cc = 0 826 dst address difference: 4 dst len: 1996 827 src address difference: 4 src len: 0 828UTF8: f1 80 bf bf 829UTF16: d8c3 dfff 830 cc = 0 831 dst address difference: 4 dst len: 1996 832 src address difference: 4 src len: 0 833UTF8: f1 bf 80 80 834UTF16: d9bc dc00 835 cc = 0 836 dst address difference: 4 dst len: 1996 837 src address difference: 4 src len: 0 838UTF8: f1 bf 80 bf 839UTF16: d9bc dc3f 840 cc = 0 841 dst address difference: 4 dst len: 1996 842 src address difference: 4 src len: 0 843UTF8: f1 bf bf 80 844UTF16: d9bf dfc0 845 cc = 0 846 dst address difference: 4 dst len: 1996 847 src address difference: 4 src len: 0 848UTF8: f1 bf bf bf 849UTF16: d9bf dfff 850 cc = 0 851 dst address difference: 4 dst len: 1996 852 src address difference: 4 src len: 0 853UTF8: f2 80 80 80 854UTF16: d9c0 dc00 855 cc = 0 856 dst address difference: 4 dst len: 1996 857 src address difference: 4 src len: 0 858UTF8: f2 80 80 bf 859UTF16: d9c0 dc3f 860 cc = 0 861 dst address difference: 4 dst len: 1996 862 src address difference: 4 src len: 0 863UTF8: f2 80 bf 80 864UTF16: d9c3 dfc0 865 cc = 0 866 dst address difference: 4 dst len: 1996 867 src address difference: 4 src len: 0 868UTF8: f2 80 bf bf 869UTF16: d9c3 dfff 870 cc = 0 871 dst address difference: 4 dst len: 1996 872 src address difference: 4 src len: 0 873UTF8: f2 bf 80 80 874UTF16: dabc dc00 875 cc = 0 876 dst address difference: 4 dst len: 1996 877 src address difference: 4 src len: 0 878UTF8: f2 bf 80 bf 879UTF16: dabc dc3f 880 cc = 0 881 dst address difference: 4 dst len: 1996 882 src address difference: 4 src len: 0 883UTF8: f2 bf bf 80 884UTF16: dabf dfc0 885 cc = 0 886 dst address difference: 4 dst len: 1996 887 src address difference: 4 src len: 0 888UTF8: f2 bf bf bf 889UTF16: dabf dfff 890 cc = 0 891 dst address difference: 4 dst len: 1996 892 src address difference: 4 src len: 0 893UTF8: f3 80 80 80 894UTF16: dac0 dc00 895 cc = 0 896 dst address difference: 4 dst len: 1996 897 src address difference: 4 src len: 0 898UTF8: f3 80 80 bf 899UTF16: dac0 dc3f 900 cc = 0 901 dst address difference: 4 dst len: 1996 902 src address difference: 4 src len: 0 903UTF8: f3 80 bf 80 904UTF16: dac3 dfc0 905 cc = 0 906 dst address difference: 4 dst len: 1996 907 src address difference: 4 src len: 0 908UTF8: f3 80 bf bf 909UTF16: dac3 dfff 910 cc = 0 911 dst address difference: 4 dst len: 1996 912 src address difference: 4 src len: 0 913UTF8: f3 bf 80 80 914UTF16: dbbc dc00 915 cc = 0 916 dst address difference: 4 dst len: 1996 917 src address difference: 4 src len: 0 918UTF8: f3 bf 80 bf 919UTF16: dbbc dc3f 920 cc = 0 921 dst address difference: 4 dst len: 1996 922 src address difference: 4 src len: 0 923UTF8: f3 bf bf 80 924UTF16: dbbf dfc0 925 cc = 0 926 dst address difference: 4 dst len: 1996 927 src address difference: 4 src len: 0 928UTF8: f3 bf bf bf 929UTF16: dbbf dfff 930 cc = 0 931 dst address difference: 4 dst len: 1996 932 src address difference: 4 src len: 0 933UTF8: f4 80 80 80 934UTF16: dbc0 dc00 935 cc = 0 936 dst address difference: 4 dst len: 1996 937 src address difference: 4 src len: 0 938UTF8: f4 80 80 bf 939UTF16: dbc0 dc3f 940 cc = 0 941 dst address difference: 4 dst len: 1996 942 src address difference: 4 src len: 0 943UTF8: f4 80 bf 80 944UTF16: dbc3 dfc0 945 cc = 0 946 dst address difference: 4 dst len: 1996 947 src address difference: 4 src len: 0 948UTF8: f4 80 bf bf 949UTF16: dbc3 dfff 950 cc = 0 951 dst address difference: 4 dst len: 1996 952 src address difference: 4 src len: 0 953UTF8: f4 8f 80 80 954UTF16: dbfc dc00 955 cc = 0 956 dst address difference: 4 dst len: 1996 957 src address difference: 4 src len: 0 958UTF8: f4 8f 80 bf 959UTF16: dbfc dc3f 960 cc = 0 961 dst address difference: 4 dst len: 1996 962 src address difference: 4 src len: 0 963UTF8: f4 8f bf 80 964UTF16: dbff dfc0 965 cc = 0 966 dst address difference: 4 dst len: 1996 967 src address difference: 4 src len: 0 968UTF8: f4 8f bf bf 969UTF16: dbff dfff 970 cc = 0 971 dst address difference: 4 dst len: 1996 972 src address difference: 4 src len: 0 973 974----- Valid characters if m3 == 0 ----- 975UTF8: f5 00 00 00 f6 11 22 33 f7 44 55 66 976UTF16: d8c0 dc00 da06 dcb3 dad1 dd66 977 cc = 0 978 dst address difference: 12 dst len: 1988 979 src address difference: 12 src len: 0 980 981----- Invalid characters (2nd byte is invalid) ----- 982UTF8: f0 8f 80 80 983UTF16: dbfc dc00 984 cc = 0 985 dst address difference: 4 dst len: 1996 986 src address difference: 4 src len: 0 987UTF8: f0 c0 80 80 988UTF16: dbc0 dc00 989 cc = 0 990 dst address difference: 4 dst len: 1996 991 src address difference: 4 src len: 0 992UTF8: f4 7f 80 80 993UTF16: d8bc dc00 994 cc = 0 995 dst address difference: 4 dst len: 1996 996 src address difference: 4 src len: 0 997UTF8: f4 90 80 80 998UTF16: d800 dc00 999 cc = 0 1000 dst address difference: 4 dst len: 1996 1001 src address difference: 4 src len: 0 1002UTF8: f1 7f 80 80 1003UTF16: d9bc dc00 1004 cc = 0 1005 dst address difference: 4 dst len: 1996 1006 src address difference: 4 src len: 0 1007UTF8: f1 c0 80 80 1008UTF16: d8c0 dc00 1009 cc = 0 1010 dst address difference: 4 dst len: 1996 1011 src address difference: 4 src len: 0 1012UTF8: f2 7f 80 80 1013UTF16: dabc dc00 1014 cc = 0 1015 dst address difference: 4 dst len: 1996 1016 src address difference: 4 src len: 0 1017UTF8: f2 c0 80 80 1018UTF16: d9c0 dc00 1019 cc = 0 1020 dst address difference: 4 dst len: 1996 1021 src address difference: 4 src len: 0 1022UTF8: f3 7f 80 80 1023UTF16: dbbc dc00 1024 cc = 0 1025 dst address difference: 4 dst len: 1996 1026 src address difference: 4 src len: 0 1027UTF8: f3 c0 80 80 1028UTF16: dac0 dc00 1029 cc = 0 1030 dst address difference: 4 dst len: 1996 1031 src address difference: 4 src len: 0 1032 1033----- Invalid characters (3rd byte is invalid) ----- 1034UTF8: f0 94 7f 80 1035UTF16: d813 dfc0 1036 cc = 0 1037 dst address difference: 4 dst len: 1996 1038 src address difference: 4 src len: 0 1039UTF8: f0 94 c0 80 1040UTF16: d810 dc00 1041 cc = 0 1042 dst address difference: 4 dst len: 1996 1043 src address difference: 4 src len: 0 1044UTF8: f1 84 7f 80 1045UTF16: d8d3 dfc0 1046 cc = 0 1047 dst address difference: 4 dst len: 1996 1048 src address difference: 4 src len: 0 1049UTF8: f1 84 c0 80 1050UTF16: d8d0 dc00 1051 cc = 0 1052 dst address difference: 4 dst len: 1996 1053 src address difference: 4 src len: 0 1054UTF8: f2 84 7f 80 1055UTF16: d9d3 dfc0 1056 cc = 0 1057 dst address difference: 4 dst len: 1996 1058 src address difference: 4 src len: 0 1059UTF8: f2 84 c0 80 1060UTF16: d9d0 dc00 1061 cc = 0 1062 dst address difference: 4 dst len: 1996 1063 src address difference: 4 src len: 0 1064UTF8: f3 84 7f 80 1065UTF16: dad3 dfc0 1066 cc = 0 1067 dst address difference: 4 dst len: 1996 1068 src address difference: 4 src len: 0 1069UTF8: f3 84 c0 80 1070UTF16: dad0 dc00 1071 cc = 0 1072 dst address difference: 4 dst len: 1996 1073 src address difference: 4 src len: 0 1074UTF8: f4 84 7f 80 1075UTF16: dbd3 dfc0 1076 cc = 0 1077 dst address difference: 4 dst len: 1996 1078 src address difference: 4 src len: 0 1079UTF8: f4 84 c0 80 1080UTF16: dbd0 dc00 1081 cc = 0 1082 dst address difference: 4 dst len: 1996 1083 src address difference: 4 src len: 0 1084 1085----- Invalid characters (4th byte is invalid) ----- 1086UTF8: f0 94 80 7f 1087UTF16: d810 dc3f 1088 cc = 0 1089 dst address difference: 4 dst len: 1996 1090 src address difference: 4 src len: 0 1091UTF8: f0 94 80 c0 1092UTF16: d810 dc00 1093 cc = 0 1094 dst address difference: 4 dst len: 1996 1095 src address difference: 4 src len: 0 1096UTF8: f1 84 80 7f 1097UTF16: d8d0 dc3f 1098 cc = 0 1099 dst address difference: 4 dst len: 1996 1100 src address difference: 4 src len: 0 1101UTF8: f1 84 80 c0 1102UTF16: d8d0 dc00 1103 cc = 0 1104 dst address difference: 4 dst len: 1996 1105 src address difference: 4 src len: 0 1106UTF8: f2 84 80 7f 1107UTF16: d9d0 dc3f 1108 cc = 0 1109 dst address difference: 4 dst len: 1996 1110 src address difference: 4 src len: 0 1111UTF8: f2 84 80 c0 1112UTF16: d9d0 dc00 1113 cc = 0 1114 dst address difference: 4 dst len: 1996 1115 src address difference: 4 src len: 0 1116UTF8: f3 84 80 7f 1117UTF16: dad0 dc3f 1118 cc = 0 1119 dst address difference: 4 dst len: 1996 1120 src address difference: 4 src len: 0 1121UTF8: f3 84 80 c0 1122UTF16: dad0 dc00 1123 cc = 0 1124 dst address difference: 4 dst len: 1996 1125 src address difference: 4 src len: 0 1126UTF8: f4 84 80 7f 1127UTF16: dbd0 dc3f 1128 cc = 0 1129 dst address difference: 4 dst len: 1996 1130 src address difference: 4 src len: 0 1131UTF8: f4 84 80 c0 1132UTF16: dbd0 dc00 1133 cc = 0 1134 dst address difference: 4 dst len: 1996 1135 src address difference: 4 src len: 0 1136 1137----- Invalid 2nd char AND output exhausted ----- 1138UTF8: f0 00 80 80 1139UTF16: <none> 1140 cc = 1 1141 dst address difference: 0 dst len: 1 1142 src address difference: 0 src len: 4 1143 1144----- Invalid 3rd char AND output exhausted ----- 1145UTF8: f0 aa 00 80 1146UTF16: <none> 1147 cc = 1 1148 dst address difference: 0 dst len: 3 1149 src address difference: 0 src len: 4 1150 1151----- Invalid 4th char AND output exhausted ----- 1152UTF8: f0 aa aa 00 1153UTF16: <none> 1154 cc = 1 1155 dst address difference: 0 dst len: 3 1156 src address difference: 0 src len: 4 1157 1158----- 1st char valid, 2nd char invalid ----- 1159UTF8: f0 aa aa aa f0 00 00 00 1160UTF16: d86a deaa dbc0 dc00 1161 cc = 0 1162 dst address difference: 8 dst len: 1992 1163 src address difference: 8 src len: 0 1164 1165------------- test1 ---------------- 1166UTF8: <none> 1167UTF16: <none> 1168 cc = 0 1169 dst len: 0 1170 src len: 0 1171 1172------------- test2.1 ---------------- 1173UTF8: <none> 1174UTF16: <none> 1175 cc = 0 1176 dst address difference: 0 dst len: 2000 1177 src len: 0 1178UTF8: <none> 1179UTF16: <none> 1180 cc = 0 1181 dst address difference: 0 dst len: 2000 1182 src address difference: 0 src len: 0 1183UTF8: <none> 1184UTF16: <none> 1185 cc = 0 1186 dst address difference: 0 dst len: 2000 1187 src address difference: 0 src len: 0 1188UTF8: c2 1189UTF16: <none> 1190 cc = 0 1191 dst address difference: 0 dst len: 2000 1192 src address difference: 0 src len: 1 1193UTF8: <none> 1194UTF16: <none> 1195 cc = 0 1196 dst address difference: 0 dst len: 2000 1197 src address difference: 0 src len: 0 1198UTF8: e1 1199UTF16: <none> 1200 cc = 0 1201 dst address difference: 0 dst len: 2000 1202 src address difference: 0 src len: 1 1203UTF8: e1 80 1204UTF16: <none> 1205 cc = 0 1206 dst address difference: 0 dst len: 2000 1207 src address difference: 0 src len: 2 1208UTF8: <none> 1209UTF16: <none> 1210 cc = 0 1211 dst address difference: 0 dst len: 2000 1212 src address difference: 0 src len: 0 1213UTF8: f4 1214UTF16: <none> 1215 cc = 0 1216 dst address difference: 0 dst len: 2000 1217 src address difference: 0 src len: 1 1218UTF8: f4 80 1219UTF16: <none> 1220 cc = 0 1221 dst address difference: 0 dst len: 2000 1222 src address difference: 0 src len: 2 1223UTF8: f4 80 80 1224UTF16: <none> 1225 cc = 0 1226 dst address difference: 0 dst len: 2000 1227 src address difference: 0 src len: 3 1228 1229------------- test2.2 ---------------- 1230UTF8: 00 01 1231UTF16: 0000 0001 1232 cc = 0 1233 dst address difference: 4 dst len: 1996 1234 src address difference: 2 src len: 0 1235UTF8: c2 80 c2 81 c2 1236UTF16: 0080 0081 1237 cc = 0 1238 dst address difference: 4 dst len: 1996 1239 src address difference: 4 src len: 1 1240UTF8: e1 80 80 e1 80 81 1241UTF16: 1000 1001 1242 cc = 0 1243 dst address difference: 4 dst len: 1996 1244 src address difference: 6 src len: 0 1245UTF8: f4 80 80 80 f4 80 80 81 f4 1246UTF16: dbc0 dc00 dbc0 dc01 1247 cc = 0 1248 dst address difference: 8 dst len: 1992 1249 src address difference: 8 src len: 1 1250 1251------------- test3.1 ---------------- 1252UTF8: 00 01 02 03 1253UTF16: <none> 1254 cc = 1 1255 dst len: 0 1256 src address difference: 0 src len: 4 1257UTF8: c2 80 c2 81 c2 82 c2 83 1258UTF16: <none> 1259 cc = 1 1260 dst len: 0 1261 src address difference: 0 src len: 8 1262UTF8: c2 80 c2 81 c2 82 c2 83 1263UTF16: <none> 1264 cc = 1 1265 dst len: 1 1266 src address difference: 0 src len: 8 1267UTF8: e1 80 80 e1 80 81 e1 80 82 e1 80 83 1268UTF16: <none> 1269 cc = 1 1270 dst len: 0 1271 src address difference: 0 src len: 12 1272UTF8: e1 80 80 e1 80 81 e1 80 82 e1 80 83 1273UTF16: <none> 1274 cc = 1 1275 dst len: 1 1276 src address difference: 0 src len: 12 1277UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 1278UTF16: <none> 1279 cc = 1 1280 dst len: 0 1281 src address difference: 0 src len: 16 1282UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 1283UTF16: <none> 1284 cc = 1 1285 dst len: 1 1286 src address difference: 0 src len: 16 1287UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 1288UTF16: <none> 1289 cc = 1 1290 dst len: 2 1291 src address difference: 0 src len: 16 1292UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 1293UTF16: <none> 1294 cc = 1 1295 dst len: 3 1296 src address difference: 0 src len: 16 1297 1298------------- test3.2 ---------------- 1299UTF8: 00 01 02 03 1300UTF16: 0000 0001 1301 cc = 1 1302 dst address difference: 4 dst len: 0 1303 src address difference: 2 src len: 2 1304UTF8: 00 01 02 03 c2 80 c2 81 1305UTF16: 0000 0001 1306 cc = 1 1307 dst address difference: 4 dst len: 1 1308 src address difference: 2 src len: 6 1309UTF8: 00 01 02 03 c2 80 c2 81 c2 82 c2 83 1310UTF16: 0000 0001 0002 1311 cc = 1 1312 dst address difference: 6 dst len: 0 1313 src address difference: 3 src len: 9 1314UTF8: 00 01 02 03 c2 80 c2 81 c2 82 c2 83 e1 80 80 e1 1315UTF16: 0000 0001 0002 1316 cc = 1 1317 dst address difference: 6 dst len: 1 1318 src address difference: 3 src len: 13 1319 1320------------- test4 ---------------- 1321UTF8: 01 c3 80 12 e1 90 93 23 f4 80 90 8a 34 c4 8c e1 91 94 c5 8a f4 80 90 8a c5 8a e1 91 94 f4 80 90 8a e1 91 94 1322UTF16: 0001 00c0 0012 1413 0023 dbc1 dc0a 0034 010c 1454 014a dbc1 dc0a 014a 1454 dbc1 dc0a 1454 1323 cc = 0 1324 dst address difference: 36 dst len: 1964 1325 src address difference: 36 src len: 0 1326