Opened 16 years ago
Closed 16 years ago
#13 closed defect (fixed)
Support for (FLEXI-STREAMS-like) :external-format
Reported by: | ehuelsmann | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | other | Version: | |
Keywords: | Cc: | ||
Parent Tickets: |
Description ¶
Currently the code in open.lisp ignores the external format specifier. Next to that, FileStream?.java is based off RandomAccessFile?, which doesn't allow specification of input/output formats.
Streams.java, the base stream for all streams hard-codes ISO-8859-1 as its encoding.
To support :EXTERNAL-FORMAT everywhere, we need to base our streams off InputStreamReader/OutputStreamWriter? interfaces, which allow specification of the source/target character set.
Change History (3)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
For #13 I looked at FileStream?.java . If the _setFilePosition is required even for
character streams, I think there is no easy and safe way to implement multiple
encoding handling.
But since abcl can read from network connections, on which you can't do random access,
I believe there is a way to keep the seeking requirement out of the way of
character (non-binary) streams.
-- Hideo at Yokohama via armedbear-j-devel
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Implemented and merged to the trunk. Released in the 0.12 release.
Beware that - when implementing this using streams in Java - it's hard to implement the file-position SETTING form of FILE-POSITION.
It looks like there's a way out though: FileInputStream? seems to return a Channel which implements SeekableByteChannel?, which in turn implements 'public int position()' and 'public void position(int newPosition)'