more about build-index+cl-ppcre branch & encodings



On 3/4/11 9:35 AM, Leo Butler wrote:
>
> On Fri, 4 Mar 2011, Raymond Toy wrote:
>
> < On 3/4/11 1:48 AM, Robert Dodier wrote:
> < > On 3/3/11, Raymond Toy <toy.raymond at gmail.com> wrote:
> < >
> < >> Also, Leo mentioned to me that if you set
> < >> cl-info::*info-default-external-format* to NIL, then the new build-index
> < >> code will use octets.  I think you need to modify build-index and
> < >> recompile for this to work.
> < >>
> < >> I've done a few tests with this using utf8 and latin1.  The output is
> < >> what I expect, once I remember to set my terminal emulator to use the
> < >> right encoding.
> < > I can't confirm this. I've modified src/build-index.lisp so that
> < > the default value of CL-INFO::*INFO-DEFAULT-EXTERNAL-FORMAT*
> < > is NIL, nuked any build-index.lisp files, and rebuilt Maxima.
> < > I launch an xterm,
> < >
> < > LC_ALL=pt_PT.UTF-8 LANG=pt_PT.UTF-8 xterm
> < >
> < > and run Maxima in that xterm. I see that both titles and
> < > content are messed up.
> < >
> < > What exactly are the commands that you are issuing?
> < Just to be sure, I did a make clean and rebuilt everything.  I'm using
> < the Terminal app on OSX.  I set LANG=de_DE.UTF-8, and run maxima-local. 
> < "? additive" displays as I expect with "?" displayed.  This works
> < because I told Terminal to use a UTF-8 encoding.
> < 
> < Then I did LANG=de_DE.ISO8859-1 and run maxima-local.  I have to tell
> < Terminal to use latin1 and when I do that the info for additive is
> < displayed correctly too.
> < 
> < If I then switch LANG back to UTF-8, without changing the terminal
> < encoding, the help text is displayed incorrectly, which is expected,
> < since the terminal is still expecting latin1 encodings.
>  
>  Ray, I have a few questions:
>
>  -what encoding is set when you build the index files originally?
Good question.  I'm don't remember.  Is this taken from LANG?
>  -did you rebuild the index files when you switched encodings?
No, that I know for a fact that I did not rebuild anything.
>  My guess is iso88591 and no, respectively. I won't elaborate til

But let me rebuild everything using iso8859-1....

Ok.  Did a make clean, and set LANG=en_US.ISO8859-1, and then make clean.

LANG=de_DE.UTF-8 maxima-local works, if I set the terminal coding to utf-8.

LANG=de_DE.ISO8859-1 maxima-local doesn't, because the terminal is still
set for utf8.  Change the terminal encoding to iso8859-1 makes it work.

Someone else should try this an confirm that it works.

Ray