<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 24, 2018 at 7:14 PM, Robert Dodier <span dir="ltr"><<a href="mailto:robert.dodier@gmail.com" target="_blank">robert.dodier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I'm wondering if there is a way to get the list of allowable values of<br>
the :EXTERNAL-FORMAT keyword for OPEN. Is there a way to determine the<br>
possible values at run time? I looked into the source code for<br>
MAKE-FILE-STREAM but I got a little lost ... perhaps someone can point<br>
me in the right direction.<br>
<br>
What I'm trying to do is to verify whether a given format is<br>
acceptable. I am thinking that I can inspect a list to see if the<br>
given format is on the list. Another workable solution would be a<br>
function which can report whether the given format is acceptable, if<br>
such a function exists.<br></blockquote><div><br></div><div>I don't know that there's a way to enumerate them. However you can call open with an external format and it seems it will throw an exception if it isn't one.</div><div><br></div><div>Undefined encoding: FUDGE</div><div>   [Condition of type simple-error]</div><div><br></div><div>Restarts:</div><div> 0: [retry] Retry SLIME REPL evaluation request.</div><div> 1: [*abort] Return to SLIME's top level.</div><div> 2: [abort] Abort thread.</div><div><br></div><div>Backtrace:</div><div>  0: (invoke-debugger #<simple-error {2EDCBCEA}>)</div><div>  1: org.armedbear.lisp.Lisp.error(Lisp.java:382)</div><div><br></div><div>There's also some documentation in <a href="https://github.com/armedbear/abcl/blob/master/src/org/armedbear/lisp/FileStream.java#L60">FileStream.java</a> that shows that one of the possibilities is a list with a charset as car. You can get the available charsets with</div><div><br></div><div>(loop for k being the hash-keys of (jss::hashmap-to-hashtable (#"availableCharsets" 'charset.charset)) collect k)<br></div><div><br></div><div>Alan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks for your help,<br>
<br>
Robert Dodier<br>
<br>
</blockquote></div><br></div></div>