Function Entry: CLAL-SYSTEM-CODEPAGE
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: CLAL-SYSTEM-CODEPAGE
Name
clal-system-codepage
Class
clautolisp Extension Function
Syntax
(clal-system-codepage)
Arguments and Values
No arguments.
Description
Return the canonical clautolisp codepage spelling for the host's
SYSCODEPAGE system variable. Wraps (getvar "SYSCODEPAGE") and
canonicalises the raw value:
| Raw sysvar value | Canonical return string |
|---|---|
"ANSI_NNNN" |
"CP-NNNN" |
"WINDOWS-NNNN" |
"CP-NNNN" |
"CPNNNN" |
"CP-NNNN" |
"CP-NNNN" |
"CP-NNNN" (unchanged) |
"UTF-8" |
"UTF-8" |
"ISO-8859-1" |
"ISO-8859-1" |
"US-ASCII" |
"US-ASCII" |
"" (empty) |
"ANSI" |
| anything else | unchanged |
clautolisp's launch wiring populates SYSCODEPAGE from
LC_ALL / LANG / LC_CTYPE / -e at startup (see
issues/closed/encoding-dispatch.issue), so a Western-European
en_US.UTF-8 session reports "UTF-8"; a French
fr_FR.WINDOWS-1252 session reports "CP-1252". On a live
BricsCAD bridge, SYSCODEPAGE arrives in vendor format
("ANSI_1252") and folds onto the same canonical answer
clautolisp would produce in-process.
Return Values
A non-empty AutoLISP string.
Side Effects
None.
Affected By
(getvar "SYSCODEPAGE")on the active host.- The launch-time locale chain (clautolisp only).
Exceptional Situations
:host-not-supported when the active host backend does not
implement host-getvar.
Examples
;; UTF-8 locale. (clal-system-codepage) => "UTF-8" ;; fr_FR.WINDOWS-1252 locale (clautolisp folds to "CP-1252"). (clal-system-codepage) => "CP-1252" ;; Vendor-side bridge (alfe + BricsCAD). (clal-system-codepage) => "CP-1252"
Availability
- clautolisp: documented (this entry); implemented since clautolisp 1.0.80.
- AutoCAD: NOT present (
SYSCODEPAGEis, but the canonicalising wrapper is clautolisp-only). - BricsCAD: NOT present (same).
Source Notes
- clautolisp-only extension. See encoding-dispatch.issue for the canonicalisation table and the full launch-resolution chain.