The asdf-encodings Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The asdf-encodings Reference Manual

This is the asdf-encodings Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 07:40:30 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

ASDF-ENCODINGS

This library allows you to use ASDF with Lisp source files
that use an encoding different from either ASCII or UTF-8.
It depends on ASDF 2.21 or later (actually 2.20.18 or later).

TODO:
(1) actually support more implementations.
(2) Add a test suite.
(3) Test it.
(4) Add more corner cases.


==== Exported Functionality ====

The asdf-encodings defines a package ASDF-ENCODINGS.
It uses ASDF 2.21's asdf:*encoding-external-format-hook*
to define a simple mapping from encodings specified as portable keywords
to implementation-defined external formats.
It issues warnings or errors when no matching external-format is available,
depending on asdf-encodings.


function ENCODING-EXTERNAL-FORMAT (ENCODING &KEY (ON-ERROR *ON-UNSUPPORTED-ENCODING*))
  This function takes a keyword which is one of
  :default
  :utf-8 :utf8
  :latin1 :latin-1 :iso-8859-1
  a whole lot of other possibilities as per asdf-encodings::*encodings*
  and returns a value suitable for use as :external-format argument to
  the current implementation's CL:OPEN, CL:LOAD or CL:COMPILE-FILE functions.
  If the encoding is not supported on this implementation, the ON-ERROR
  argument, which is one of :ERROR, :WARN, NIL, specifies what to do.

variable *ON-UNSUPPORTED-ENCODING*
  One of :error, :warn or nil,
  specifies what to do when passed an unsupported encoding.
  Defaults to :error.

function DETECT-FILE-ENCODING (PATHNAME)
  This function takes a pathname designator,
  and returns a portable encoding as detected by the file contents,
  either an emacs-style -*- coding: foo -*- declaration,
  or something deduced from the octet patterns in the file.

function NORMALIZE-ENCODING (ENCODING)
  Given a portable encoding keyword, returns the normalized keyword
  describing that encoding on the current implementations, if any,
  or NIL if the encoding is not present on the implementation
  (or not recognized by asdf-encodings).

function FIND-IMPLEMENTATION-ENCODING (ENCODING)
  Given a normalized encoding keyword, returns
  an external-format suitable for use on the current implementation, if any.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 asdf-encodings

Author

Francois-Rene Rideau

Description

Portable interface to character encodings and your implementation’s external-format

Defsystem Dependency

asdf (at least version 3.0)

Source

asdf-encodings.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 asdf-encodings.asd

Location

asdf-encodings.asd

Systems

asdf-encodings (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 asdf-encodings/pkgdcl.lisp

Parent

asdf-encodings (system)

Location

pkgdcl.lisp

Packages

asdf-encodings


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 asdf-encodings/encodings.lisp

Dependency

pkgdcl.lisp (file)

Parent

asdf-encodings (system)

Location

encodings.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 asdf-encodings/autodetect.lisp

Dependency

pkgdcl.lisp (file)

Parent

asdf-encodings (system)

Location

autodetect.lisp

Exported Definitions

detect-file-encoding (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 asdf-encodings/asdf-support.lisp

Dependency

pkgdcl.lisp (file)

Parent

asdf-encodings (system)

Location

asdf-support.lisp

Exported Definitions
Internal Definitions

register-asdf-encodings (function)


Previous: , Up: Lisp files   [Contents][Index]

3.1.6 asdf-encodings/initialization.lisp

Dependencies
Parent

asdf-encodings (system)

Location

initialization.lisp


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 asdf-encodings

Source

pkgdcl.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *on-unsupported-encoding*

One of :error, :warn or nil, specifies what to do when passed an unsupported encoding.

Package

asdf-encodings

Source

asdf-support.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: detect-file-encoding FILE
Package

asdf-encodings

Source

autodetect.lisp (file)

Function: encoding-external-format ENCODING &key ON-ERROR
Package

asdf-encodings

Source

asdf-support.lisp (file)

Function: find-implementation-encoding ENCODING
Package

asdf-encodings

Source

encodings.lisp (file)

Function: normalize-encoding ENCODING
Package

asdf-encodings

Source

encodings.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *encodings*
Package

asdf-encodings

Source

encodings.lisp (file)

Special Variable: *normalized-encodings*
Package

asdf-encodings

Source

encodings.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: decode-ascii-encoded-declaration BUFFER AVAILABLE START SIZE OFFSET
Package

asdf-encodings

Source

autodetect.lisp (file)

Function: detect-buffer-encoding-header BUFFER AVAILABLE
Package

asdf-encodings

Source

autodetect.lisp (file)

Function: detect-utf-8 FILE
Package

asdf-encodings

Source

autodetect.lisp (file)

Function: initialize-normalized-encodings &optional WARN
Package

asdf-encodings

Source

encodings.lisp (file)

Function: register-asdf-encodings ()
Package

asdf-encodings

Source

asdf-support.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   A   F   L  
Index Entry  Section

A
asdf-encodings.asd: The asdf-encodings<dot>asd file
asdf-encodings/asdf-support.lisp: The asdf-encodings/asdf-support<dot>lisp file
asdf-encodings/autodetect.lisp: The asdf-encodings/autodetect<dot>lisp file
asdf-encodings/encodings.lisp: The asdf-encodings/encodings<dot>lisp file
asdf-encodings/initialization.lisp: The asdf-encodings/initialization<dot>lisp file
asdf-encodings/pkgdcl.lisp: The asdf-encodings/pkgdcl<dot>lisp file

F
File, Lisp, asdf-encodings.asd: The asdf-encodings<dot>asd file
File, Lisp, asdf-encodings/asdf-support.lisp: The asdf-encodings/asdf-support<dot>lisp file
File, Lisp, asdf-encodings/autodetect.lisp: The asdf-encodings/autodetect<dot>lisp file
File, Lisp, asdf-encodings/encodings.lisp: The asdf-encodings/encodings<dot>lisp file
File, Lisp, asdf-encodings/initialization.lisp: The asdf-encodings/initialization<dot>lisp file
File, Lisp, asdf-encodings/pkgdcl.lisp: The asdf-encodings/pkgdcl<dot>lisp file

L
Lisp File, asdf-encodings.asd: The asdf-encodings<dot>asd file
Lisp File, asdf-encodings/asdf-support.lisp: The asdf-encodings/asdf-support<dot>lisp file
Lisp File, asdf-encodings/autodetect.lisp: The asdf-encodings/autodetect<dot>lisp file
Lisp File, asdf-encodings/encodings.lisp: The asdf-encodings/encodings<dot>lisp file
Lisp File, asdf-encodings/initialization.lisp: The asdf-encodings/initialization<dot>lisp file
Lisp File, asdf-encodings/pkgdcl.lisp: The asdf-encodings/pkgdcl<dot>lisp file

Jump to:   A   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   D   E   F   I   N   R  
Index Entry  Section

D
decode-ascii-encoded-declaration: Internal functions
detect-buffer-encoding-header: Internal functions
detect-file-encoding: Exported functions
detect-utf-8: Internal functions

E
encoding-external-format: Exported functions

F
find-implementation-encoding: Exported functions
Function, decode-ascii-encoded-declaration: Internal functions
Function, detect-buffer-encoding-header: Internal functions
Function, detect-file-encoding: Exported functions
Function, detect-utf-8: Internal functions
Function, encoding-external-format: Exported functions
Function, find-implementation-encoding: Exported functions
Function, initialize-normalized-encodings: Internal functions
Function, normalize-encoding: Exported functions
Function, register-asdf-encodings: Internal functions

I
initialize-normalized-encodings: Internal functions

N
normalize-encoding: Exported functions

R
register-asdf-encodings: Internal functions

Jump to:   D   E   F   I   N   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*encodings*: Internal special variables
*normalized-encodings*: Internal special variables
*on-unsupported-encoding*: Exported special variables

S
Special Variable, *encodings*: Internal special variables
Special Variable, *normalized-encodings*: Internal special variables
Special Variable, *on-unsupported-encoding*: Exported special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   P   S  
Index Entry  Section

A
asdf-encodings: The asdf-encodings system
asdf-encodings: The asdf-encodings package

P
Package, asdf-encodings: The asdf-encodings package

S
System, asdf-encodings: The asdf-encodings system

Jump to:   A   P   S