vle-file-encoding


(vle-file-encoding  filename)

This function returns the encoding style of the specified filename; useful on text files, for later (open) operation.

Arguments

filename  (string) name of the text file to be examined 

Return

the encoding of the text file;
can be one of :
"ANSI"  for any text file without BOM header; also for binary, non-UTF encoded files
"UTF-8"
"UTF-16LE"
"UTF-16BE"
"UTF-32LE"
"UTF-32BE"

Example

(vle-file-encoding "MyData.dat")   "UTF-16LE" or "ANSI"

Alias


Remarks

'filename' is searched in all support pathes, if it does not contain a path;
for binary files the encoding is also reported as "ANSI" (as there is no way to distinguish an arbitrary binary file from a text file; all character bytes are in range 0x0 - 0xFF)

Remarks 2

the provided encoding string can be used with the (open) function and extended BricsCAD Lisp functionality



©  Bricsys NV. All rights reserved.