foreign language patch for build-index+cl-ppcre branch




On Thu, 24 Feb 2011, Robert Dodier wrote:

< On 2/22/11, Leo Butler <l.butler at ed.ac.uk> wrote:
< 
< > Robert, I think what you are seeing there is that your lisp is
< > using a utf-8 external format (encoding), and #\?
< > is the replacement char for non-printables.
< >
< > Based on this hunch, I've pushed a patch for build-index.lisp
< > that uses the external format in the master info file to
< > read the info files and write the hash tables. Does this
< > fix the issue you see?
< 
< As it stands it fails to build maxima-index.lisp,
< with different error messages for SBCL and Clisp.
< I've pasted the messages for doc/info/es below.
< Same error in doc/info/pt. In es.utf8 and pt.utf8,
< I guess it could succeed w/ SBCL but Clisp is the default
< for maxima-local so that's what gets called by the Makefile
< and it fails since Clisp doesn't recognize :UTF-8.
< 
< What Lisp are you using and what OS ?
< Does the current code work as expected?
 
 Apologies, I noticed this after I realised that I could
 make those info files without having the locales.
 I was erroneously opening the master info file with
 the default encoding of utf-8, hence the errors. I now
 open it as a binary file, find the encoding, then re-open
 it with the correct encoding.

 I've pushed a patch that fixes this issue for 
 sbcl, clisp and cmucl (debian testing). All the
 maxima-index.lisp files are made, and I don't see
 any non-printable characters.

 Since each lisp deals with external formats differently,
 and there are potentially os-related snafus, I've added
 two helper functions to set and retrieve the external format.
 These will need to be patched for other lisps, but since I
 don't have any other lisps lying around, I will need help
 on that.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.