Package: cffi

Variable *default-foreign-encoding*

Value Type

A keyword.

Initial Value

:utf-8

Details

This special variable holds the default foreign encoding.

Examples

  CFFI> *default-foreign-encoding*
  :utf-8
  CFFI> (foreign-funcall "strdup" (:string :encoding :utf-16) "foo" :string)
  "f"
  CFFI> (let ((*default-foreign-encoding* :utf-16))
          (foreign-funcall "strdup" (:string :encoding :utf-16) "foo" :string))
  "foo"  
Other Types (:string type)
 

See also