Function Entry: CLAL-DRAWING-CODEPAGE

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: CLAL-DRAWING-CODEPAGE

Name

clal-drawing-codepage

Class

clautolisp Extension Function

Syntax

(clal-drawing-codepage)

Arguments and Values

No arguments.

Description

Return the canonical clautolisp codepage spelling for the host's DWGCODEPAGE system variable, using the same canonicalisation table as clal-system-codepage. DWGCODEPAGE records the codepage the current drawing was authored under; without a loaded drawing it defaults to SYSCODEPAGE.

The function exists separately from clal-system-codepage so user code can compare the two (typically through clal-codepage-mismatch-p) and warn before consuming drawing- authored text whose interpretation depends on the codepage.

Return Values

A non-empty AutoLISP string.

Side Effects

None.

Affected By

  • (getvar "DWGCODEPAGE") on the active host.
  • The most-recently-loaded drawing's encoding header.

Exceptional Situations

:host-not-supported when the active host backend does not implement host-getvar.

Examples

;; No drawing loaded; defaults to SYSCODEPAGE.
(clal-drawing-codepage) => "UTF-8"

;; After loading a drawing authored under a Czech Windows machine.
(clal-drawing-codepage) => "CP-1250"

Availability

  • clautolisp: documented (this entry); implemented since clautolisp 1.0.80.
  • AutoCAD: NOT present.
  • BricsCAD: NOT present.

Source Notes

  • clautolisp-only extension.