It appears that if I want access to the raw octets ofo a file using Gambit 4.0, that I should open the file using a byte port with an encoding of Latin-1. Is this correct?
There's something about this that feels a little bit wrong though (basically the obligation to manipluate octets at the end of character set encoding issues). I would like to have something like read-octet which would return an exact integer in the range 0-255. Given the current IO design of Gambit 4.0 this appears to be a relatively easy thing to add.
Actually, in a semi-related question: Is it possible to create port subtypes from user Scheme code?
david rush -- DIsruptive Technology!
Afficher les réponses par date
On Tue, 3 Jan 2006, david rush wrote:
It appears that if I want access to the raw octets ofo a file using Gambit 4.0, that I should open the file using a byte port with an encoding of Latin-1. Is this correct?
Not really. You should look at the documentation, section 16.6.2 "Byte-port operations". You'll find what you want there.
Guillaume