Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why wouldn I always use a protocol that requires a BOM?

BOM Protocol requires wouldnt
0
10 Posted

Why wouldn I always use a protocol that requires a BOM?

0

Where the data is typed, such as a field in a database, a BOM is unnecessary. For example, if a text data stream is marked as UTF-16BE, it is unnecessary to have a BOM. In fact, it is very undesirable to tag every string in a database or set of fields with a BOM, since if the strings are concatenated without removing the BOM you get into trouble. Moreover, it also means two data fields may have precisely the same content, but not be binary-equal (where one is prefaced by a BOM).

0

Where the data has an associated type, s h as a field in a database, a BOM is unnecessary. In particular, if a text data stream is marked as UTF-16BE, UTF-16LE, UTF-32BE or UTF-32LE, a BOM is neither necessary nor permitted. Any U+FEFF would be interpreted as a ZWNBSP. Do not tag every string in a database or set of fields with a BOM, since it wastes space and complicates string concatenation. Moreover, it also means two data fields may have precisely the same content, but not be binary-eq l (where one is prefaced by a BOM).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.