Skip to content

LkbGrammarEncodingProposal

BenjaminWaldron edited this page Aug 23, 2005 · 7 revisions
  • 1. (Ensure Lisp/LKB reads grammar files using correct encoding)

    • In grammar's global.lsp use a Lisp function to set the character encoding. Something like (grammar-encoding "utf-8")

    • if running Allegro something like the following will then be executed (setf excl:*locale* (excl::find-locale ".utf8"))

    • ISSUES: canonical encoding (take from Emacs?), mapping into encoding names used by specific Lisps, Lisp function grammar-encoding must be written and incorporated into LKB code base, backwards compatibility?

  • 2. (Ensure Emacs reads grammar files using correct encoding)

    • In every grammar file require header ;;; -*- Mode: TDL; Coding: utf-8 -*-

    • ISSUES: all files must have correct header

  • 3. (Ensure Emacs and Lisp/LKB communicate in compatible and sufficient character encoding)

    • In .emacs require (set-default-coding-systems 'utf-8)

    • ISSUES: could use set-buffer-process-coding-system, UTF-8 is sufficient and should be hard-wired

Above assumes UTF-8 as the character encoding used of the grammar files. This should be strongly recommended, but any other (GNU Emacs supported) character encodings must also be allowed. Name used to specify character encoding should be same in both 1 and 2 above.

Clone this wiki locally