[Openmcl-devel] external-format question

Philippe Sismondi psismondi at arqux.com
Tue Dec 21 15:19:39 PST 2010


Ok, never mind - I answered my own question.

I'm still learning CL (after 18 months...) and I just discovered the method (stream-external-format...) which lets me find out what I need to know.

- Phil - 

On 2010-12-21, at 4:42 PM, Philippe Sismondi wrote:

> This is perhaps an OS X question rather than a ccl question. I am puzzled as to how to get text written out to a file the right way.
> 
> The text in question is an OS X file name containing, for example, ñ (n with a tilde) and other accented characters. When I output such text to the REPL (using slime or ccl directly in a terminal) the characters show up fine. However, when I write the same text to a file, and then look at the file emacs or using more in a terminal, the accented characters are wrong: you know, line noise.
> 
> I have tried various values for :external-format when opening the output file, but it does not help. For instance, I tried :utf-8, :unix, :mac-roman, etc. Is this the right key parameter to be setting?
> 
> I believe I do understand enough about character encodings per se. However, I have long been baffled as how various operating systems deal with the whole matter. I could probably do a binary dump of the text and ferret out the encoding, but being lazy I'll just post the question :P
> 
> Anyway, this certainly makes me feel dim-witted. Can someone tell me what I should do to get the same results in a file as I do outputting with (format t ...) ? Or tell me what I misunderstand, perhaps?
> 
> Using: ccl 1.6, aquamacs+slime, OS X 10.6.5, a Swiss Army knife and a MacGyver paper clip.
> 
> Muchas Gracias.
> 
> - Phil -
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list