Opened 13 years ago

Closed 12 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 13 years ago by ehuelsmann

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)'

comment:2 Changed 13 years ago by Mark Evenson

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 12 years ago by ehuelsmann

Resolution: fixed
Status: newclosed

Implemented and merged to the trunk. Released in the 0.12 release.

Note: See TracTickets for help on using tickets.