home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / charsets / utf-8-test.txt < prev    next >
Text File  |  2020-01-01  |  3KB  |  64 lines

  1. UTF-8 decoder capability and stress test
  2. ----------------------------------------
  3.  
  4. Markus Kuhn <mkuhn@acm.org> - 1999-04-28
  5.  
  6. This test text examines, how UTF-8 decoders handle various types of
  7. corrupted or otherwise interesting UTF-8 sequences. According to ISO
  8. 10646-1, sections R.7 and 2.3c, a device receiving UTF-8 shall
  9. interpret a "malformed sequence in the same way that it interprets a
  10. character that is outside the adopted subset".
  11.  
  12. Test sequences (all enclosed in ""):
  13.  
  14. Correct UTF-8 text (Greek word 'kosme'):     "╬║ß╜╣╧â╬╝╬╡"
  15. Correct 2-byte sequence (U+00000080):        "┬Ç"
  16. Correct 3-byte sequence (U+00000800):        "αáÇ"
  17. Correct 4-byte sequence (U+00010000):        "≡ÉÇÇ"
  18. Correct 5-byte sequence (U+00200000):        "°êÇÇÇ"
  19. Correct 6-byte sequence (U+04000000):        "ⁿäÇÇÇÇ"
  20. Correct 2-byte sequence (U+000007ff):        "▀┐"
  21. Correct 3-byte sequence (U+0000ffff):        "∩┐┐"
  22. Correct 4-byte sequence (U+001fffff):        "≈┐┐┐"
  23. Correct 5-byte sequence (U+03ffffff):        "√┐┐┐┐"
  24. Correct 6-byte sequence (U+7fffffff):        "²┐┐┐┐┐"
  25. Correct 2-byte sequence (U+0000):            "└Ç"
  26. Correct 3-byte sequence (U+0000):            "αÇÇ"
  27. Correct 4-byte sequence (U+0000):            "≡ÇÇÇ"
  28. Correct 5-byte sequence (U+0000):            "°ÇÇÇÇ"
  29. Correct 6-byte sequence (U+0000):            "ⁿÇÇÇÇÇ"
  30. Unexpected continuation byte (10000000):     "Ç"
  31. Another lonely continuation byte (10111111): "┐"
  32. Sequence of 2 unexpected continuation bytes: "Ç┐"
  33. Sequence of 3 unexpected continuation bytes: "Ç┐Ç"
  34. Sequence of 4 unexpected continuation bytes: "Ç┐Ç┐"
  35. Sequence of 5 unexpected continuation bytes: "Ç┐Ç┐Ç"
  36. Sequence of 6 unexpected continuation bytes: "Ç┐Ç┐Ç┐"
  37. Sequence of 7 unexpected continuation bytes: "Ç┐Ç┐Ç┐Ç"
  38. Sequence of all 64 possible continuation bytes (10000000-10111111):
  39. "ÇüéâäàåçêëèïîìÄÅ
  40.  ÉæÆôöòûùÿÖÜ¢£¥₧ƒ
  41.  áíóúñѪº¿⌐¬½¼¡«»
  42.  ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐"
  43. Sequence of all 32 first bytes of 2-byte sequences (11000000-11011111),
  44. each followed by a space character:
  45. "└ ┴ ┬ ├ ─ ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ 
  46.  ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ "
  47. Sequence of all 16 first bytes of 3-byte sequences (11100000-11101111),
  48. each followed by a space character: "α ß Γ π Σ σ µ τ Φ Θ Ω δ ∞ φ ε ∩ "
  49. Sequence of all 8 first bytes of 4-byte sequences (11110000-11110111),
  50. each followed by a space character: "≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ "
  51. Sequence of all 4 first bytes of 5-byte sequences (11111000-11111011),
  52. each followed by a space character: "° ∙ · √ "
  53. Sequence of all 2 first bytes of 6-byte sequences (11111100-11111101),
  54. each followed by a space character: "ⁿ ² "
  55. Impossible byte (11111110): "■"
  56. Impossible byte (11111111): " "
  57. 2-byte sequence with last byte missing: "└"
  58. 3-byte sequence with last byte missing: "αÇ"
  59. 4-byte sequence with last byte missing: "≡ÇÇ"
  60. 5-byte sequence with last byte missing: "°ÇÇÇ"
  61. 6-byte sequence with last byte missing: "ⁿÇÇÇÇ"
  62. All these 5 sequences with last byte missing concatenated:
  63. "└αÇ≡ÇÇ°ÇÇÇⁿÇÇÇÇ"
  64.