[developers] Re: grammar encoding best practice

Ben Waldron benjamin.waldron at cl.cam.ac.uk
Thu Oct 27 17:54:27 CEST 2005


I've put a first stab at the grammar-encoding function in 
io-general/utils.lsp. It is currently only useful if you are running 
Allegro Common Lisp -- if not, you'll see a warning telling you that the 
function call is being ignored. Out of interest, is anyone actually 
using any other Lisps? And if so, which one(s)?

The idea is that the same call to the grammar-encoding function can be 
made independent of Lisp implementation (and the naming scheme used 
should be consistent with the naming scheme for character encodings as 
used by Gnu Emacs).

(See http://wiki.delph-in.net/moin/LkbGrammarEncodingProposal)

- Ben

===
SAMPLE USAGE:

Set character encoding (to match grammar files) in globals.lsp via call 
such as

(grammar-encoding 'utf-8)

in place of Lisp-implementation-specific code such as

#+:allegro 
(setf excl:*locale* (excl::find-locale ".utf8"))

===


Francis Bond wrote:
>G'day,
>
>  
>>Would on have any feedback on the following outline proposal (from
>>Stephan + me):
>>
>>http://wiki.delph-in.net/moin/LkbGrammarEncodingProposal
>>    
>
>(1) is fine --- although I don't know how we link 
>A: (grammar-encoding "utf-8")
>tp
>B: 
>if running Allegro something like the following will then be executed 
>(setf excl:*locale* (excl::find-locale ".utf8"))
>
>This requires a table of encodings and some action per lisp version. 
>I would be tempted to just recomment people add:
>#+:allegro 
>(setf excl:*locale* (excl::find-locale ".utf8"))
>
>We should also mention that it should go near the top of the file.
>
>  

>(2) Is also good.  We should mention that mulitbyte users also need to
>load mule-ucs for emacs 21.   I am happy to add stuff when we reach
>consensus, but I don't know how to make this work for Windows/Mac.
>
>We should perhaps also mention the possibility of other editors.
>
>(3) I don't think we should mandate utf-8 for people's default
>encoding.  As far as I can tell we don't actually need to with the
>latest eli (the one with ACL 7.0) and emacs 21.  Many people use emacs
>for things other than the lkb...
>
>Other things to mention include 
>(4) setting the multibyte thing for cdb (unless we make it the default)
>
>;; Write CDB temporary files as binary
>(defparameter cdb::*cdb-ascii-p* nil)
>
>(5) Links to PET, Lexdb and Lui settings.
>
>Also it might be friendly to mention some of the known issues on this page:
>
>(i) text input doesn't work for multibyte characters in CLIM
>(ii) not all character sets display properly (e.g. Korean)
>(iii) Do we need to add notes for versions compiled with ACL 6.2
>(where the encoding names are different)?
>(iv) postscript/LaTeX printing from CLIM/LUI with non-ascii characters
>
>I am happy to add some of this to the wiki (most of it can be cut and
>pasted from
>http://wiki.delph-in.net/moin/LkbEmacs) but thought we should discuss
>a little more first.
>
>
>  




More information about the developers mailing list