Lisp HUG Maillist Archive

Fasl file encoding?

Hi,

I have the following question regarding character encoding in fasl  
files (LWM Personal 5.0.2 on Intel).

The following function returns a string with some Central-European  
characters (I hope you can see the correct characters in the mail):

(defun test ()
   "Netřeba přenášeti tetřeva")

If I define this function in the Listener, then it behaves correctly:

CL-USER 6 > (test)
"Netřeba přenášeti tetřeva"

I observe the same correct behavior if I put this definition in a  
separate Editor buffer and evaluate it (for example using F7 or F8  
keys). However, if this definition is stored in a compiled file and  
loaded, then the encoding of result is not correct:

CL-USER 7 > (test)
"Netřeba přenášeti tetřeva"

Is this a bug or what?

In the case it matters, I use the UTF-8 encoding for my source files  
(I achieved this by editing hidden Editor Config files by hand)  
because no encoding offered by LWM Editor File Encodings preference  
pane can be used for Central-European characters, at least AFAIK. I  
wonder why Unicode encodings are not available for users in the  
preference pane.

Thanks,

Michal

Re: Fasl file encoding?


On Mar 30, 2008, at 8:22 AM, Michal Krupka wrote:

> CL-USER 6 > (test)
> "Netřeba přenášeti tetřeva"
>
> I observe the same correct behavior if I put this definition in a  
> separate Editor buffer and evaluate it (for example using F7 or F8  
> keys). However, if this definition is stored in a compiled file and  
> loaded, then the encoding of result is not correct:
>
> CL-USER 7 > (test)
> "Netřeba přenášeti tetřeva"
>
> Is this a bug or what?
>
> In the case it matters, I use the UTF-8 encoding for my source files  
> (I achieved this by editing hidden Editor Config files by hand)  
> because no encoding offered by LWM Editor File Encodings preference  
> pane can be used for Central-European characters, at least AFAIK. I  
> wonder why Unicode encodings are not available for users in the  
> preference pane.


Try adding a mode lone at the top of your source files, e.g.

;; -*- mode: lisp; encoding: utf-8; -*-



John DeSoi, Ph.D.





Updated at: 2020-12-10 08:43 UTC