FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Object described on page has changed in 10.1.
10.0 version

sniff-for-unicode

Arguments: stream &optional return-bom

This function checks stream, which must be either a character stream or a simple-stream, for the unicode byte-order marker and returns two or three values (three when return-bom is non-nil). The first returned value is either the :unicode external-format (if the unicode byte-order marker is found) or the stream's current external-format (if the unicode byte-order marker is not found).

The second returned value is a boolean indicating whether the first returned value is the stream's current external-format (which it always is when the unicode byte-order marker is not found and may or may not be when the unicode byte-order marker is found).

This function operates by using peek-char on the stream. The file-position for the stream remains unchanged after calling sniff-for-unicode.

If the return-bom argument is present and non-nil, a third value is returned. The third value is nil if no BOM is detected; it is :utf-8, :utf-16le, or :utf-16be if the corresponding BOM is present.

See The unicode and fat External-Format Types in iacl.htm for information on the unicode external format and iacl.htm in general for information on international character support in Allegro CL.


Copyright (c) 1998-2017, Franz Inc. Oakland, CA., USA. All rights reserved.
The object described on this page has been modified in the 10.1 release; see the Release Notes.
Created 2017.2.15.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Object described on page has changed in 10.1.
10.0 version