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



On 2/24/11 4:10 PM, Leo Butler wrote:
>  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.
>
Mostly works for me with cmucl, but I had to apply the following patch,
basically adding with-standard-io-syntax, which is a good idea for all
Lisps.  For some reason I have non-NIL values for *print-length* and
*print-level*, so maxima-index.lisp had ... characters in there.

One other thing that needs to be solved for cmucl is that when I used
LANG=de_DE, maxima somehow decides to use utf8 encoding.  That's fine,
but when the documentation is printed, cmucl uses it's default encoding
of iso8859-1, so ? is used in quite a few places.  For example, ?
additive gives question marks in various places.

I'll need to look around to see where to hook  these together.

If it still matters, I don't think gcl has any kind of external format
support.  

In many ways, it would be good to treat the info files as binary files
of octets and use octet offsets.  Then when we read and display the
documentation, we don't need any special support.  Just output the
octets assuming the user has done the right magic so that the
terminal/wxmaxima/etc. have the correct encoding.  (The terminal setting
has to be set correctly no matter whether we use octets or characters.)



Ray


diff --git a/src/build-index.lisp b/src/build-index.lisp
index 6a807f1..22ed42b 100644
--- a/src/build-index.lisp
+++ b/src/build-index.lisp
@@ -384,8 +384,12 @@ before adding new contents."
                      (car efs))))))
     (cond (file
           (setf ef (get-external-format ef))
-          (with-open-file (out file :direction :output :if-exists
:supersede :if-does-not
-            (dump-hashes out)))
+          (with-open-file (out file :direction :output
+                               :if-exists :supersede
+                               :if-does-not-exist :create
+                               :external-format ef)
+            (with-standard-io-syntax
+              (dump-hashes out))))
          (t
           (dump-hashes *standard-output*)))))
 
diff --git a/src/gcl-depends.mk b/src/gcl-depends.mk