A byte-order mark is a special leading byte sequence associated with text encoding. Its handling depends on the format and reader. A file that looks ordinary in an editor can therefore begin with bytes that affect an importer before the first visible character.

Do not apply one format’s rule to every text file. HLS has specific UTF-8 playlist requirements, while XML has its own encoding-identification rules. A general channel-list importer may document additional behaviour. Establish the actual format before changing the beginning of the file.

The empty playlist form. — IPTV USA editorial illustration

Identify the first bytes accurately

An editor may hide the marker while still preserving it. A screenshot of the first visible line does not prove that the file begins with those exact visible characters. Use an appropriate private file-information method if the leading bytes are relevant to the error.

A byte-order mark is not the same as the EXTM3U header or an XML declaration. These are different pieces of information. Adding or removing one cannot substitute for the other when the format requires a particular structure.

Check a suspected leading-byte issue

Do not remove arbitrary leading bytes because a forum post says they are “invisible junk.” They may identify an encoding in a context that uses them. Conversely, an editor’s default save setting is not proof that the output satisfies the destination format.

  1. Preserve the original file unchanged.
  2. Identify the intended document type and its encoding rules.
  3. Inspect whether a marker is present using a suitable local tool.
  4. Use a controlled encoding or save operation consistent with that format.
  5. Test the corrected duplicate and compare the exact import result.

Keep conversion reversible

A file can contain another underlying encoding problem beyond its marker. Removing the marker does not necessarily make all text valid UTF-8, and adding one does not convert the remaining bytes. Preserve the original so a mistaken conversion can be reversed.

If the import succeeds after a controlled change, record exactly what changed and which client accepted it. That is evidence about the tested file and importer. It does not prove that every player requires the same treatment.

For support, give the document type, declared or detected encoding, presence of a marker and exact non-secret error. A harmless minimal example can demonstrate the issue. The goal is compliance with the actual input format, not a universal rule that every text file should have—or never have—the same leading sequence.

Useful answers

Is a byte-order mark the same as a playlist header?

No. They serve different purposes.

Does removing a marker automatically convert the rest of the file to UTF-8?

No. Encoding conversion is a separate operation.

Should one importer’s behaviour be assumed universal?

No. Follow the actual format and reader requirements.