Subject: [[email-masked]: Re: [clisp-list] special characters in comments]

From: Matt Kaufmann <[email-masked]>
Date: Mon Oct 14 07:06:05 2002

My apologies -- in fact your suggestion of using iso-8859-1 DOES work.
Apparently changing custom:*default-file-encoding* does not affect the existing
standard input stream; but I can now load a file with character 243 in a
comment.

Thanks --
-- Matt K.
------- Start of forwarded message -------
Date: Mon, 14 Oct 2002 08:41:44 -0500
From: Matt Kaufmann <[email-masked]>
To: [email-masked]
CC: [email-masked]
In-reply-to: <1034576356.6303.7.camel@work> (message from Adam Warner on 14
	Oct 2002 19:19:16 +1300)
Subject: Re: [clisp-list] special characters in comments

Thanks, but changing to iso-8859-1 encoding didn't seem to help:

  [1]> custom:*default-file-encoding*
  #<ENCODING CHARSET:ASCII :UNIX>
  [2]> ; ó

  *** - invalid byte #xF3 in CHARSET:ASCII conversion
  1. Break [3]> :a

  [4]> (setq custom:*default-file-encoding* charset:iso-8859-1)
  #<ENCODING CHARSET:ISO-8859-1 :UNIX>
  [5]> ; ó

  *** - invalid byte #xF3 in CHARSET:ASCII conversion
  1. Break [6]> 

The vast majority of my problems were with the two characters that are handled
by utf-8.  I've changed the user-contributed files that use the other three, so
this isn't any longer an issue for me, anyhow.  Thanks for the responses.

- -- Matt K.
   From: Adam Warner <[email-masked]>
   Cc: [email-masked]
   Content-Type: text/plain
   Date: 14 Oct 2002 19:19:16 +1300

   On Mon, 2002-10-14 at 17:09, Matt Kaufmann wrote:
   > Thank you for the quick reply.  So, I've added the following to the ACL2
   > sources (the check for unicode is necessary because charset:utf-8 was
   > introduced after CLISP 2.27):
   > 
   >   #+(and clisp unicode) (setq custom:*default-file-encoding* charset:utf-8)
   > 
   > This eliminated problems with two of the characters (#xAB and #xB7), but some
   > characters used in comments still cause errors:
   > 
   > *** - invalid byte sequence #xED #x74 #x75 in CHARSET:UTF-8 conversion
   > *** - invalid byte sequence #xF1 #x61 #x74 #x69 in CHARSET:UTF-8 conversion
   > *** - invalid byte sequence #xF3 #x20 #x61 #x2F in CHARSET:UTF-8 conversion

   If you use a faithfully reproducing character set it will be impossible
   to use invalid characters in comments. I suggest you try iso-8859-1
   decoding instead of utf-8.

   You can read about faithful output here:
   http://cl-cookbook.sourceforge.net/io.html

   Longer term you may wish to convert the code to utf-8 encoding so you
   can use that instead of an 8-bit character set.

   Regards,
   Adam
------- End of forwarded message -------