{specialstring:type}

Description

Returns a fixed special string selected by name. The only recognized name is BOM, which returns the three-byte UTF-8 Byte Order Mark (the bytes EF BB BF). Any other name, or an empty argument, returns an empty string. The typical use is to prepend the BOM at the very start of an exported feed, CSV, or other download so that consumers reliably detect UTF-8 encoding. The BOM bytes are not visible characters, so the output looks empty on screen even though three bytes are produced.

Parameters

type optional default (empty)

The name of the special string to return. The only recognized name is BOM (the UTF-8 Byte Order Mark). Any other value, or an empty argument, returns an empty string.

Examples

test[{specialstring:foo}]
Expected[]
Actual[]
Any name other than BOM returns an empty string. The square brackets are literal text added to make the empty result visible.
test[{specialstring:}]
Expected[]
Actual[]
With no argument the command returns an empty string, the same as any unrecognized name.
test{strlen:{specialstring:BOM}}
Expected3
Actual3
The name BOM returns the three-byte UTF-8 Byte Order Mark (EF BB BF). The bytes are invisible on screen, so this example wraps the output in strlen to prove its length is exactly 3 bytes.
virtual{specialstring:BOM}id,title,date
Expected(three invisible BOM bytes, then: id,title,date)
Actualid,title,date
The real-world use: put the BOM at the very start of an exported feed or CSV so consumers detect UTF-8. The three BOM bytes precede the visible text but do not show on screen, so this example is illustrative rather than an asserted test.