# Generated by: tfg preset eject text-encoding
# Does my reader know which encoding a file is in, or is it guessing?
#
# Edit it, commit it, it is an ordinary recipe from here on.

version: 1
targets:
  - id: encoding_md_utf-16be
    format: md
    count: 1
    size: 4096
    name: utf-16be.md
    group: encoding
    purpose: "A Markdown file in UTF-16BE with no byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "false"
      encoding: utf-16be
  - id: encoding_md_utf-16be_bom
    format: md
    count: 1
    size: 4096
    name: utf-16be_bom.md
    group: encoding
    purpose: "A Markdown file in UTF-16BE that starts with a byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "true"
      encoding: utf-16be
  - id: encoding_md_utf-16le
    format: md
    count: 1
    size: 4096
    name: utf-16le.md
    group: encoding
    purpose: "A Markdown file in UTF-16LE with no byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "false"
      encoding: utf-16le
  - id: encoding_md_utf-16le_bom
    format: md
    count: 1
    size: 4096
    name: utf-16le_bom.md
    group: encoding
    purpose: "A Markdown file in UTF-16LE that starts with a byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "true"
      encoding: utf-16le
  - id: encoding_md_utf-8
    format: md
    count: 1
    size: 4096
    name: utf-8.md
    group: encoding
    purpose: A Markdown file in UTF-8 with no byte order mark. Your reader should take it and show every character right.
    expected: accept
    properties:
      bom: "false"
      encoding: utf-8
  - id: encoding_md_utf-8_bom
    format: md
    count: 1
    size: 4096
    name: utf-8_bom.md
    group: encoding
    purpose: "A Markdown file in UTF-8 that starts with a byte order mark. Your reader should take it - the mark is legal, and one shown as three stray characters, or carried into the first field of an import, is a fault."
    expected: accept
    properties:
      bom: "true"
      encoding: utf-8
  - id: encoding_txt_utf-16be
    format: txt
    count: 1
    size: 4096
    name: utf-16be.txt
    group: encoding
    purpose: "A Plain text file in UTF-16BE with no byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "false"
      encoding: utf-16be
  - id: encoding_txt_utf-16be_bom
    format: txt
    count: 1
    size: 4096
    name: utf-16be_bom.txt
    group: encoding
    purpose: "A Plain text file in UTF-16BE that starts with a byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "true"
      encoding: utf-16be
  - id: encoding_txt_utf-16le
    format: txt
    count: 1
    size: 4096
    name: utf-16le.txt
    group: encoding
    purpose: "A Plain text file in UTF-16LE with no byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "false"
      encoding: utf-16le
  - id: encoding_txt_utf-16le_bom
    format: txt
    count: 1
    size: 4096
    name: utf-16le_bom.txt
    group: encoding
    purpose: "A Plain text file in UTF-16LE that starts with a byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "true"
      encoding: utf-16le
  - id: encoding_txt_utf-8
    format: txt
    count: 1
    size: 4096
    name: utf-8.txt
    group: encoding
    purpose: A Plain text file in UTF-8 with no byte order mark. Your reader should take it and show every character right.
    expected: accept
    properties:
      bom: "false"
      encoding: utf-8
  - id: encoding_txt_utf-8_bom
    format: txt
    count: 1
    size: 4096
    name: utf-8_bom.txt
    group: encoding
    purpose: "A Plain text file in UTF-8 that starts with a byte order mark. Your reader should take it - the mark is legal, and one shown as three stray characters, or carried into the first field of an import, is a fault."
    expected: accept
    properties:
      bom: "true"
      encoding: utf-8
  - id: encoding_xml_utf-16be_bom
    format: xml
    count: 1
    size: 4096
    name: utf-16be_bom.xml
    group: encoding
    purpose: "A Extensible Markup Language file in UTF-16BE that starts with a byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "true"
      encoding: utf-16be
  - id: encoding_xml_utf-16le_bom
    format: xml
    count: 1
    size: 4096
    name: utf-16le_bom.xml
    group: encoding
    purpose: "A Extensible Markup Language file in UTF-16LE that starts with a byte order mark, two bytes for every character. Whether your reader takes UTF-16 at all is its own policy - check that it reads the text right or refuses it clearly, and never shows it as one character in three."
    expected:
      outcome: unspecified
      reason: encoding_invalid
    properties:
      bom: "true"
      encoding: utf-16le
  - id: encoding_xml_utf-8
    format: xml
    count: 1
    size: 4096
    name: utf-8.xml
    group: encoding
    purpose: A Extensible Markup Language file in UTF-8 with no byte order mark. Your reader should take it and show every character right.
    expected: accept
    properties:
      bom: "false"
      encoding: utf-8
  - id: encoding_xml_utf-8_bom
    format: xml
    count: 1
    size: 4096
    name: utf-8_bom.xml
    group: encoding
    purpose: "A Extensible Markup Language file in UTF-8 that starts with a byte order mark. Your reader should take it - the mark is legal, and one shown as three stray characters, or carried into the first field of an import, is a fault."
    expected: accept
    properties:
      bom: "true"
      encoding: utf-8
  - id: line_endings_csv_crlf
    format: csv
    count: 1
    size: 4096
    name: crlf.csv
    group: line-endings
    purpose: "A Comma-Separated Values file whose lines end in CR LF, the way Windows and Excel write them. Your reader should take it - one that splits lines on LF alone keeps a carriage return at the end of every line."
    expected: accept
    properties:
      line_ending: crlf
  - id: line_endings_csv_lf
    format: csv
    count: 1
    size: 4096
    name: lf.csv
    group: line-endings
    purpose: "A Comma-Separated Values file whose lines end in LF. Your reader should take it - both endings are legal, and a reader that expects the other one sees a single long line or an empty one after each."
    expected: accept
    properties:
      line_ending: lf
  - id: line_endings_log_crlf
    format: log
    count: 1
    size: 4096
    name: crlf.log
    group: line-endings
    purpose: "A Server and application log file whose lines end in CR LF, the way Windows and Excel write them. Your reader should take it - one that splits lines on LF alone keeps a carriage return at the end of every line."
    expected: accept
    properties:
      line_ending: crlf
  - id: line_endings_log_lf
    format: log
    count: 1
    size: 4096
    name: lf.log
    group: line-endings
    purpose: "A Server and application log file whose lines end in LF. Your reader should take it - both endings are legal, and a reader that expects the other one sees a single long line or an empty one after each."
    expected: accept
    properties:
      line_ending: lf
