201 lines
12 KiB
HTML
201 lines
12 KiB
HTML
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>CLHS: Issue EXTERNAL-FORMAT-FOR-EVERY-FILE-CONNECTION Writeup</TITLE>
|
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
|
<LINK REL=TOP HREF="../Front/index.htm">
|
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
|
<LINK REL=PREV HREF="../Issues/iss154_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss155.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss156_w.htm">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss154_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss155.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss156_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue EXTERNAL-FORMAT-FOR-EVERY-FILE-CONNECTION Writeup</H2>
|
|
|
|
<PRE><B>Status:</B> MINUMUM proposal accepted 4/1/92<P>
|
|
<B>Issue:</B> <A HREF="iss155.htm">EXTERNAL-FORMAT-FOR-EVERY-FILE-CONNECTION</A><P>
|
|
<B>Forum:</B> Cleanup<P>
|
|
<B>References:</B> <A REL=DEFINITION HREF="../Body/f_open.htm#open"><B>OPEN</B></A>, <A REL=DEFINITION HREF="../Body/m_w_open.htm#with-open-file"><B>WITH-OPEN-FILE</B></A>, <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A>, <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A>, <A REL=DEFINITION HREF="../Body/f_stm_ex.htm#stream-external-format"><B>STREAM-EXTERNAL-FORMAT</B></A><P>
|
|
<B>Category:</B> EXTEND<P>
|
|
<B>Edit history:</B> 10-Jan-92, Version 1 by Masa Ida<P>
|
|
14-Jan-92, Version 2 ibid. <P>
|
|
(correct a typo. add Editorial Impact field. Add Discussion.)<P>
|
|
1-Apr-92, Version 3 by Barrett<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_cmp__1.htm#compile-file-pathname"><B>compile-file-pathname</B></A>, similarity of constants constraint)<P>
|
|
2-Apr-92, Version 4 by Barrett (amendments from meeting)<P>
|
|
<P>
|
|
<B>Problem Description:<P>
|
|
</B><P>
|
|
<A REL=DEFINITION HREF="../Body/f_open.htm#open"><B>OPEN</B></A> and <A REL=DEFINITION HREF="../Body/m_w_open.htm#with-open-file"><B>WITH-OPEN-FILE</B></A> have :EXTERNAL-FORMAT keyword<P>
|
|
to specify the external format of files, but other file<P>
|
|
connecting interfaces like <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> have no such keyword.<P>
|
|
As a result uniform handling of external formats are<P>
|
|
impossible with the current draft.<P>
|
|
<P>
|
|
Proposal (<A HREF="iss155.htm">EXTERNAL-FORMAT-FOR-EVERY-FILE-CONNECTION:MINIMUM</A>);<P>
|
|
<P>
|
|
Add the :EXTERNAL-FORMAT keyword to <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> and <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A>.<P>
|
|
The default value is :DEFAULT as in <A REL=DEFINITION HREF="../Body/f_open.htm#open"><B>OPEN</B></A>. This argument specifies the<P>
|
|
character representation scheme to be used by <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> and <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A><P>
|
|
when reading a source file, in the same manner as for <A REL=DEFINITION HREF="../Body/f_open.htm#open"><B>OPEN</B></A>.<P>
|
|
<P>
|
|
This changes the syntax descriptions to<P>
|
|
Compile-file input-pathname &key :output-file :verbose<P>
|
|
:print :external-format<P>
|
|
Load filename &key :verbose :print :if-does-not-exist<P>
|
|
:external-format<P>
|
|
<P>
|
|
Add to the descriptions of <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> and <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> a cross reference to<P>
|
|
(or copy of) the description of the :EXTERNAL-FORMAT argument for <A REL=DEFINITION HREF="../Body/f_open.htm#open"><B>OPEN</B></A>.<P>
|
|
<P>
|
|
The :EXTERNAL-FORMAT argument is ignored by <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> when opening a<P>
|
|
compiled file. Instead, <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> and <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> must cooperate (using<P>
|
|
some implementation-dependent mechanism) in such a way that similarity<P>
|
|
of constants is maintained across the interface between these two<P>
|
|
functions.<P>
|
|
<P>
|
|
<B>Editorial Impact:<P>
|
|
</B> Trivial. If <A REL=DEFINITION HREF="../Body/f_stm_ex.htm#stream-external-format"><B>STREAM-EXTERNAL-FORMAT</B></A> description will refer<P>
|
|
the usage of :EXTERNAL-FORMAT in the future, editorial consideration<P>
|
|
will be needed.<P>
|
|
<P>
|
|
<B>Test Case:<P>
|
|
</B><P>
|
|
(<A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> "MY-PROG.LISP" :EXTERNAL-FORMAT :NIHONGO-EUC)<P>
|
|
will load the file MY-PROG.LISP which contains nihongo-euc<P>
|
|
coded characters defined by UI-OSF joint japanization definition.<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> "YY.CL")<P>
|
|
will compile the file YY.CL with the default understanding.<P>
|
|
<P>
|
|
<B>Rationale:<P>
|
|
</B> Uniform handling of external formats are enabled by<P>
|
|
adopting this proposal.<P>
|
|
<P>
|
|
<B>Current Practice:<P>
|
|
</B> There is no way to specify the coding scheme for<P>
|
|
loading/compiling files.<P>
|
|
Several Japanese commercial CL implementations use<P>
|
|
this scheme.<P>
|
|
<P>
|
|
<B>Cost to Implementors:<P>
|
|
</B> If implementation supports :default only, the cost is negligible.<P>
|
|
<P>
|
|
<B>Cost to Users:<P>
|
|
</B> The existing japanized software with their own tricks for<P>
|
|
converting the codes must rewrite the interface to the<P>
|
|
system supplied one to have a portability.<P>
|
|
<P>
|
|
<B>Cost of Non-Adoption:<P>
|
|
</B> Incompatibility with the Jeida Guideline draft.<P>
|
|
<P>
|
|
<B>Benefits:<P>
|
|
</B> Performance up.<P>
|
|
Compatible definition.<P>
|
|
<P>
|
|
<B>Aesthetics:<P>
|
|
</B> unified syntax.<P>
|
|
<P>
|
|
<P>
|
|
Proposal (EXTERNAL-FORMAT-FOR-EVERY-FILE-CONNECTION:JEIDA-GUIDELINE);<P>
|
|
<P>
|
|
Only :DEFAULT is defined for the value of :EXTERNAL-FORMAT now.<P>
|
|
Other possible selections are not defined.<P>
|
|
Add the following selections for :external-format value.<P>
|
|
:nihongo-jis file contains JIS X0202 encoding JIS characters.<P>
|
|
:nihongo-euc file contains nihongo-euc defined by<P>
|
|
the joint convention defined by UI-OSF.<P>
|
|
:nihongo-ms file contains Microsoft Kanji Code.<P>
|
|
<P>
|
|
<B>Editorial Impact:<P>
|
|
</B> Trivial. If <A REL=DEFINITION HREF="../Body/f_stm_ex.htm#stream-external-format"><B>STREAM-EXTERNAL-FORMAT</B></A> description will refer<P>
|
|
the usage of :EXTERNAL-FORMAT in the future, editorial consideration<P>
|
|
will be needed.<P>
|
|
<P>
|
|
<B>Test Case:<P>
|
|
</B> See the Test Case for MINIMUM<P>
|
|
<P>
|
|
<B>Rationale:<P>
|
|
</B> Every practical conversion scheme is provided with this definition.<P>
|
|
<P>
|
|
<B>Current Practice:<P>
|
|
</B> Users write their own codes for conversion. Or<P>
|
|
Several CL cannot handle japanese characters.<P>
|
|
<P>
|
|
<B>Cost to Implementors:<P>
|
|
</B> Requiers the supporting mechanisms/libraries for japanese<P>
|
|
character handling.<P>
|
|
<P>
|
|
<B>Cost to Users:<P>
|
|
</B><P>
|
|
<B>Cost of Non-Adoption:<P>
|
|
</B> Incompatibility with the Jeida Guideline draft.<P>
|
|
<P>
|
|
<B>Benefits:<P>
|
|
</B> By adopting this proposal, implementations can have a portable<P>
|
|
way for japanization.<P>
|
|
<P>
|
|
<B>Aesthetics:<P>
|
|
</B> If there is consideration for other nations,<P>
|
|
say, we can add :arabic-XXX, :chinese-XXX, ...<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B> Masa Ida recomended to have the MINIMUM proposal.<P>
|
|
The proposal JEIDA-GUIDELINE seems to be too sudden for X3J13<P>
|
|
and may <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> more detailed definition.<P>
|
|
The proposal JEIDA-GUIDELINE seems to be not needed for USA domestic<P>
|
|
Applications.<P>
|
|
<P>
|
|
Date: Mon, 13 Jan 92 11:16:40 EST<P>
|
|
From: kab@cambridge.apple.com (Kim Barrett)<P>
|
|
I don't yet have an informed opinion on the proposal (after the above<P>
|
|
bug is fixed), but my initial reaction is that this certainly seems<P>
|
|
plausible. I couldn't think of any operators besides the two mentioned<P>
|
|
that implicitly call <A REL=DEFINITION HREF="../Body/f_open.htm#open"><B>OPEN</B></A>.<P>
|
|
<P>
|
|
Date: Mon, 13 Jan 1992 16:37-0500<P>
|
|
From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM><P>
|
|
I do believe this is an important issue. I think it's nice for us to<P>
|
|
try to cater to the legitimate technical needs of the international<P>
|
|
community in order to better position CL for acceptance in the<P>
|
|
international arena, both in the standards arena and in the commercial<P>
|
|
arena. I hope that at the appropriate time we will give it due<P>
|
|
consideration.<P>
|
|
My personal opinion is that the proposal looks solid (modulo the<P>
|
|
obvious typo--missing "not"--mentioned by Kim Barrett) and worth doing,<P>
|
|
both for general consistency and because I can easily see where the<P>
|
|
absence of this feature would lead to some serious problems.<P>
|
|
<P>
|
|
From: Larry Masinter <masinter@parc.xerox.com><P>
|
|
Date: Mon, 13 Jan 1992 15:49:14 PST<P>
|
|
I like the :MINIMUM proposal, but I would be wary of including the<P>
|
|
JEIDA guideline without also including other values for<P>
|
|
:EXTERNAL-FORMAT.<P>
|
|
There is apprently good progress in the ISO 10646 <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A>. (The DIS-2<P>
|
|
ISO 10646 was supposed to be issued January 1992 for a 4-month<P>
|
|
vote...)<P>
|
|
Even if we listed interpretations for :external-format that included<P>
|
|
JIS, EUC and Microsoft Kanji codes, it would seem to be important to<P>
|
|
include a better reference for those coding schemes, since they tend<P>
|
|
to get revised from time to time. <P>
|
|
It might be that the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> should not include these keywords any<P>
|
|
more than a listing of features, but that some other informal or<P>
|
|
formal consortium of implementors could keep a registry of keyword<P>
|
|
assignments.<P>
|
|
</PRE>
|
|
<HR>
|
|
|
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
|
|
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
|
</BODY>
|
|
</HTML>
|