===== Conversion of a one-byte character =====

----- Valid characters -----
UTF8:   00 7f 01 10 7e 5d
UTF16:  0000 007f 0001 0010 007e 005d
  cc = 0
  dst address difference: 12  dst len: 1988
  src address difference: 6  src len: 0

----- Invalid characters -----
UTF8:   80
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   bf
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   f8
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   ff
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   81
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   be
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   95
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   ab
UTF16:  <none>
  cc = 2
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1

----- Invalid characters if m3 == 1 -----
UTF8:   c0
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   c1
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   f5
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   f6
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   f7
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1

----- 1st char valid, 2nd char invalid -----
UTF8:   10 aa
UTF16:  0010
  cc = 2
  dst address difference: 2  dst len: 1998
  src address difference: 1  src len: 1

===== Conversion of a two-byte character =====

----- Valid characters -----
UTF8:   c2 80 c2 bf df 80 df bf c3 be da bc
UTF16:  0080 00bf 07c0 07ff 00fe 06bc
  cc = 0
  dst address difference: 12  dst len: 1988
  src address difference: 12  src len: 0

----- Valid characters if m3 == 0 -----
UTF8:   c0 80 c0 bf c1 80 c0 bf
UTF16:  0000 003f 0040 003f
  cc = 0
  dst address difference: 8  dst len: 1992
  src address difference: 8  src len: 0

----- Invalid characters if m3 == 1 -----
UTF8:   c2 00
UTF16:  0080
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 2  src len: 0
UTF8:   c2 7f
UTF16:  00bf
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 2  src len: 0
UTF8:   c2 c0
UTF16:  0080
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 2  src len: 0
UTF8:   c2 ff
UTF16:  00bf
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 2  src len: 0

----- 1st char valid, 2nd char invalid -----
UTF8:   c3 81 c4 00
UTF16:  00c1 0100
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0

===== Conversion of a three-byte character =====

----- Valid characters -----
UTF8:   e0 a0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb
UTF16:  0800 0fc0 083f 0fff 0abb
  cc = 0
  dst address difference: 10  dst len: 1990
  src address difference: 15  src len: 0
UTF8:   ed 80 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb
UTF16:  d000 d7c0 d03f d7ff d2bb
  cc = 0
  dst address difference: 10  dst len: 1990
  src address difference: 15  src len: 0
UTF8:   e1 80 80
UTF16:  1000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e1 bf 80
UTF16:  1fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e1 80 bf
UTF16:  103f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e1 bf bf
UTF16:  1fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 80 80
UTF16:  2000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 bf 80
UTF16:  2fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 80 bf
UTF16:  203f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 bf bf
UTF16:  2fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 80 80
UTF16:  3000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 bf 80
UTF16:  3fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 80 bf
UTF16:  303f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 bf bf
UTF16:  3fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 80 80
UTF16:  4000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 bf 80
UTF16:  4fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 80 bf
UTF16:  403f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 bf bf
UTF16:  4fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 80 80
UTF16:  5000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 bf 80
UTF16:  5fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 80 bf
UTF16:  503f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 bf bf
UTF16:  5fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 80 80
UTF16:  6000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 bf 80
UTF16:  6fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 80 bf
UTF16:  603f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 bf bf
UTF16:  6fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 80 80
UTF16:  7000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 bf 80
UTF16:  7fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 80 bf
UTF16:  703f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 bf bf
UTF16:  7fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 80 80
UTF16:  8000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 bf 80
UTF16:  8fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 80 bf
UTF16:  803f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 bf bf
UTF16:  8fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 80 80
UTF16:  9000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 bf 80
UTF16:  9fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 80 bf
UTF16:  903f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 bf bf
UTF16:  9fff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea 80 80
UTF16:  a000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea bf 80
UTF16:  afc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea 80 bf
UTF16:  a03f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea bf bf
UTF16:  afff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb 80 80
UTF16:  b000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb bf 80
UTF16:  bfc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb 80 bf
UTF16:  b03f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb bf bf
UTF16:  bfff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec 80 80
UTF16:  c000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec bf 80
UTF16:  cfc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec 80 bf
UTF16:  c03f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec bf bf
UTF16:  cfff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee 80 80
UTF16:  e000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee bf 80
UTF16:  efc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee 80 bf
UTF16:  e03f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee bf bf
UTF16:  efff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef 80 80
UTF16:  f000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef bf 80
UTF16:  ffc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef 80 bf
UTF16:  f03f
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef bf bf
UTF16:  ffff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0

----- Invalid characters (2nd byte is invalid) -----
UTF8:   e0 9f 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb
UTF16:  07c0 0fc0 083f 0fff 0abb
  cc = 0
  dst address difference: 10  dst len: 1990
  src address difference: 15  src len: 0
UTF8:   e0 c0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb
UTF16:  0000 0fc0 083f 0fff 0abb
  cc = 0
  dst address difference: 10  dst len: 1990
  src address difference: 15  src len: 0
UTF8:   ed 7f 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb
UTF16:  dfc0 d7c0 d03f d7ff d2bb
  cc = 0
  dst address difference: 10  dst len: 1990
  src address difference: 15  src len: 0
UTF8:   ed a0 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb
UTF16:  d800 d7c0 d03f d7ff d2bb
  cc = 0
  dst address difference: 10  dst len: 1990
  src address difference: 15  src len: 0
UTF8:   e1 7f 80
UTF16:  1fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e1 c0 80
UTF16:  1000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 7f 80
UTF16:  2fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 c0 80
UTF16:  2000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 7f 80
UTF16:  3fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 c0 80
UTF16:  3000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 7f 80
UTF16:  4fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 c0 80
UTF16:  4000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 7f 80
UTF16:  5fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 c0 80
UTF16:  5000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 7f 80
UTF16:  6fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 c0 80
UTF16:  6000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 7f 80
UTF16:  7fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 c0 80
UTF16:  7000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 7f 80
UTF16:  8fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 c0 80
UTF16:  8000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 7f 80
UTF16:  9fc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 c0 80
UTF16:  9000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea 7f 80
UTF16:  afc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea c0 80
UTF16:  a000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb 7f 80
UTF16:  bfc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb c0 80
UTF16:  b000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec 7f 80
UTF16:  cfc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec c0 80
UTF16:  c000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee 7f 80
UTF16:  efc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee c0 80
UTF16:  e000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef 7f 80
UTF16:  ffc0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef c0 80
UTF16:  f000
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0

----- Invalid characters (3rd byte is invalid) -----
UTF8:   e0 ab 7f
UTF16:  0aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e0 ab c0
UTF16:  0ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e1 ab 7f
UTF16:  1aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e1 ab c0
UTF16:  1ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 ab 7f
UTF16:  2aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e2 ab c0
UTF16:  2ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 ab 7f
UTF16:  3aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e3 ab c0
UTF16:  3ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 ab 7f
UTF16:  4aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e4 ab c0
UTF16:  4ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 ab 7f
UTF16:  5aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e5 ab c0
UTF16:  5ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 ab 7f
UTF16:  6aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e6 ab c0
UTF16:  6ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 ab 7f
UTF16:  7aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e7 ab c0
UTF16:  7ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 ab 7f
UTF16:  8aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e8 ab c0
UTF16:  8ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 ab 7f
UTF16:  9aff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   e9 ab c0
UTF16:  9ac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea ab 7f
UTF16:  aaff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ea ab c0
UTF16:  aac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb ab 7f
UTF16:  baff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   eb ab c0
UTF16:  bac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec ab 7f
UTF16:  caff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ec ab c0
UTF16:  cac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ed ab 7f
UTF16:  daff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ed ab c0
UTF16:  dac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee ab 7f
UTF16:  eaff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ee ab c0
UTF16:  eac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef ab 7f
UTF16:  faff
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0
UTF8:   ef ab c0
UTF16:  fac0
  cc = 0
  dst address difference: 2  dst len: 1998
  src address difference: 3  src len: 0

----- Invalid 2nd char AND output exhausted -----
UTF8:   e0 00 80
UTF16:  <none>
  cc = 1
  dst address difference: 0  dst len: 1
  src address difference: 0  src len: 3

----- Invalid 3rd char AND output exhausted -----
UTF8:   e4 84 00
UTF16:  <none>
  cc = 1
  dst address difference: 0  dst len: 1
  src address difference: 0  src len: 3

----- 1st char valid, 2nd char invalid -----
UTF8:   e1 90 90 e1 00 90
UTF16:  1410 1010
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 6  src len: 0

===== Conversion of a four-byte character =====

----- Valid characters -----
UTF8:   f0 90 80 80
UTF16:  d800 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 90 80 bf
UTF16:  d800 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 90 bf 80
UTF16:  d803 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 90 bf bf
UTF16:  d803 dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 bf 80 80
UTF16:  d8bc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 bf 80 bf
UTF16:  d8bc dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 bf bf 80
UTF16:  d8bf dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 bf bf bf
UTF16:  d8bf dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 80 80 80
UTF16:  d8c0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 80 80 bf
UTF16:  d8c0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 80 bf 80
UTF16:  d8c3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 80 bf bf
UTF16:  d8c3 dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 bf 80 80
UTF16:  d9bc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 bf 80 bf
UTF16:  d9bc dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 bf bf 80
UTF16:  d9bf dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 bf bf bf
UTF16:  d9bf dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 80 80 80
UTF16:  d9c0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 80 80 bf
UTF16:  d9c0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 80 bf 80
UTF16:  d9c3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 80 bf bf
UTF16:  d9c3 dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 bf 80 80
UTF16:  dabc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 bf 80 bf
UTF16:  dabc dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 bf bf 80
UTF16:  dabf dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 bf bf bf
UTF16:  dabf dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 80 80 80
UTF16:  dac0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 80 80 bf
UTF16:  dac0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 80 bf 80
UTF16:  dac3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 80 bf bf
UTF16:  dac3 dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 bf 80 80
UTF16:  dbbc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 bf 80 bf
UTF16:  dbbc dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 bf bf 80
UTF16:  dbbf dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 bf bf bf
UTF16:  dbbf dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 80 80 80
UTF16:  dbc0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 80 80 bf
UTF16:  dbc0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 80 bf 80
UTF16:  dbc3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 80 bf bf
UTF16:  dbc3 dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 8f 80 80
UTF16:  dbfc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 8f 80 bf
UTF16:  dbfc dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 8f bf 80
UTF16:  dbff dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 8f bf bf
UTF16:  dbff dfff
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0

----- Valid characters if m3 == 0 -----
UTF8:   f5 00 00 00 f6 11 22 33 f7 44 55 66
UTF16:  d8c0 dc00 da06 dcb3 dad1 dd66
  cc = 0
  dst address difference: 12  dst len: 1988
  src address difference: 12  src len: 0

----- Invalid characters (2nd byte is invalid) -----
UTF8:   f0 8f 80 80
UTF16:  dbfc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 c0 80 80
UTF16:  dbc0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 7f 80 80
UTF16:  d8bc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 90 80 80
UTF16:  d800 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 7f 80 80
UTF16:  d9bc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 c0 80 80
UTF16:  d8c0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 7f 80 80
UTF16:  dabc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 c0 80 80
UTF16:  d9c0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 7f 80 80
UTF16:  dbbc dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 c0 80 80
UTF16:  dac0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0

----- Invalid characters (3rd byte is invalid) -----
UTF8:   f0 94 7f 80
UTF16:  d813 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 94 c0 80
UTF16:  d810 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 84 7f 80
UTF16:  d8d3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 84 c0 80
UTF16:  d8d0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 84 7f 80
UTF16:  d9d3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 84 c0 80
UTF16:  d9d0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 84 7f 80
UTF16:  dad3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 84 c0 80
UTF16:  dad0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 84 7f 80
UTF16:  dbd3 dfc0
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 84 c0 80
UTF16:  dbd0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0

----- Invalid characters (4th byte is invalid) -----
UTF8:   f0 94 80 7f
UTF16:  d810 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f0 94 80 c0
UTF16:  d810 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 84 80 7f
UTF16:  d8d0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f1 84 80 c0
UTF16:  d8d0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 84 80 7f
UTF16:  d9d0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f2 84 80 c0
UTF16:  d9d0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 84 80 7f
UTF16:  dad0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f3 84 80 c0
UTF16:  dad0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 84 80 7f
UTF16:  dbd0 dc3f
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0
UTF8:   f4 84 80 c0
UTF16:  dbd0 dc00
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 0

----- Invalid 2nd char AND output exhausted -----
UTF8:   f0 00 80 80
UTF16:  <none>
  cc = 1
  dst address difference: 0  dst len: 1
  src address difference: 0  src len: 4

----- Invalid 3rd char AND output exhausted -----
UTF8:   f0 aa 00 80
UTF16:  <none>
  cc = 1
  dst address difference: 0  dst len: 3
  src address difference: 0  src len: 4

----- Invalid 4th char AND output exhausted -----
UTF8:   f0 aa aa 00
UTF16:  <none>
  cc = 1
  dst address difference: 0  dst len: 3
  src address difference: 0  src len: 4

----- 1st char valid, 2nd char invalid -----
UTF8:   f0 aa aa aa f0 00 00 00
UTF16:  d86a deaa dbc0 dc00
  cc = 0
  dst address difference: 8  dst len: 1992
  src address difference: 8  src len: 0

------------- test1 ----------------
UTF8:   <none>
UTF16:  <none>
  cc = 0
  dst len: 0
  src len: 0

------------- test2.1 ----------------
UTF8:   <none>
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src len: 0
UTF8:   <none>
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 0
UTF8:   <none>
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 0
UTF8:   c2
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   <none>
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 0
UTF8:   e1
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   e1 80
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 2
UTF8:   <none>
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 0
UTF8:   f4
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 1
UTF8:   f4 80
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 2
UTF8:   f4 80 80
UTF16:  <none>
  cc = 0
  dst address difference: 0  dst len: 2000
  src address difference: 0  src len: 3

------------- test2.2 ----------------
UTF8:   00 01
UTF16:  0000 0001
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 2  src len: 0
UTF8:   c2 80 c2 81 c2
UTF16:  0080 0081
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 4  src len: 1
UTF8:   e1 80 80 e1 80 81
UTF16:  1000 1001
  cc = 0
  dst address difference: 4  dst len: 1996
  src address difference: 6  src len: 0
UTF8:   f4 80 80 80 f4 80 80 81 f4
UTF16:  dbc0 dc00 dbc0 dc01
  cc = 0
  dst address difference: 8  dst len: 1992
  src address difference: 8  src len: 1

------------- test3.1 ----------------
UTF8:   00 01 02 03
UTF16:  <none>
  cc = 1
  dst len: 0
  src address difference: 0  src len: 4
UTF8:   c2 80 c2 81 c2 82 c2 83
UTF16:  <none>
  cc = 1
  dst len: 0
  src address difference: 0  src len: 8
UTF8:   c2 80 c2 81 c2 82 c2 83
UTF16:  <none>
  cc = 1
  dst len: 1
  src address difference: 0  src len: 8
UTF8:   e1 80 80 e1 80 81 e1 80 82 e1 80 83
UTF16:  <none>
  cc = 1
  dst len: 0
  src address difference: 0  src len: 12
UTF8:   e1 80 80 e1 80 81 e1 80 82 e1 80 83
UTF16:  <none>
  cc = 1
  dst len: 1
  src address difference: 0  src len: 12
UTF8:   f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83
UTF16:  <none>
  cc = 1
  dst len: 0
  src address difference: 0  src len: 16
UTF8:   f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83
UTF16:  <none>
  cc = 1
  dst len: 1
  src address difference: 0  src len: 16
UTF8:   f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83
UTF16:  <none>
  cc = 1
  dst len: 2
  src address difference: 0  src len: 16
UTF8:   f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83
UTF16:  <none>
  cc = 1
  dst len: 3
  src address difference: 0  src len: 16

------------- test3.2 ----------------
UTF8:   00 01 02 03
UTF16:  0000 0001
  cc = 1
  dst address difference: 4  dst len: 0
  src address difference: 2  src len: 2
UTF8:   00 01 02 03 c2 80 c2 81
UTF16:  0000 0001
  cc = 1
  dst address difference: 4  dst len: 1
  src address difference: 2  src len: 6
UTF8:   00 01 02 03 c2 80 c2 81 c2 82 c2 83
UTF16:  0000 0001 0002
  cc = 1
  dst address difference: 6  dst len: 0
  src address difference: 3  src len: 9
UTF8:   00 01 02 03 c2 80 c2 81 c2 82 c2 83 e1 80 80 e1
UTF16:  0000 0001 0002
  cc = 1
  dst address difference: 6  dst len: 1
  src address difference: 3  src len: 13

------------- test4 ----------------
UTF8:   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
UTF16:  0001 00c0 0012 1413 0023 dbc1 dc0a 0034 010c 1454 014a dbc1 dc0a 014a 1454 dbc1 dc0a 1454
  cc = 0
  dst address difference: 36  dst len: 1964
  src address difference: 36  src len: 0
