[Openmcl-devel] encodings

Gary Byers gb at clozure.com
Fri Mar 27 16:42:15 UTC 2009



On Thu, 26 Mar 2009, Joakim Sandgren wrote:

> Hi,
> I would like to know how far the developpment concerning encoding text.
> I am a swedish guy living in paris and I use swedish and french in my coding 
> so I cover most of the problem-signs like é ç à ä å and ö etc...
> I have not been able to open correctly my french swedish mcl documents, but 
> have to open them in an other app to paste it into a new document ccl and 
> then save that in utf-8 format...

The "Open" dialog in the IDE has the same popup menu as the "Save" dialog(s);
it allows you to select the file's character encoding from a popup menu
that contains way too many entries.  There's a fairly good chance that
your old MCL source files are are encoded in what's often called "MacRoman"
(and which is more officially known as/appears in the popup as "Macintosh").

It's supposed to be the case that the default entry in that popup is
derived from the value of CCL:*DEFAULT-FILE-CHARACTER-ENCODING*, but the
code that handles that seems to be a little confused (and seems to default
to ISO-8859-1 for me.)

Aside from the fact that you may have to continually select "Macintosh"
from the popup menu's list of encodings, does this not work for you ?

> And I am not able to write these signes into a document ccl... nothing appear 
> when I write ä or é etc...

On a US keyboard, one ordinarily types a "Latin Small Letter E With Acute"
by typing option-E, then typing "'".  The option-E is what's known as a
"dead key": it doesn't generate a character itself, but determines what
character is generated by the next keystroke.

There are at least two issues here in the CCL IDE:

1) The IDE's editor uses the option key as a "meta prefix", so in order
to have a keystroke that involves the option key interpreted as a character
and not as an editor command it's necessary to "quote the next character."

On a UK keyboard, the # character ("sharp" or "pound" or "hash" or ...)
is produced by typing option-3; in order to keep "option-3" from being
interpreted as "meta-3", it's necessary to type "ctrl-q option-3", which
is certainly awkward.

2) Even if one prefixes a dead key with ctrl-q, the editor gets confused;
it basically needs to pass dead-key events to the Cocoa text system
(and may need to stay out of the way until the multi-key input is
complete.)

> I am not an expert on all this.
> am I doing something wrong?
> Joakim
>
>
>
> Joakim Sandgren
> joakim sandgren musik
> 42, rue de Maubeuge
> 75009 Paris
> France
> +33 (0)1 45 26 43 90
> info at joakimsandgren.com
> http://www.joakimsandgren.com
>


More information about the Openmcl-devel mailing list