close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Opened 11 years ago

Closed 11 years ago

#79 closed defect (fixed)

File-position at start of file is wrong

Reported by: Raymond Toy Owned by: somebody
Priority: major Milestone:
Component: Core Version: 2013-03-a
Keywords: Cc:


Let foo be an file of latin1 characters. Then

(with-open-file (s "foo" :external-format :latin1)
  (print (file-position s))
  (read-char s)
  (print (file-position s)))



This is totally unexpected. I would expect 0 and 1 to be printed.

If foo has utf8 encoding then

(with-open-file (s "foo" :external-format :utf8)
  (print (file-position s))
  (read-char s)
  (print (file-position s)))

prints something like


I would expect 0 to be printed instead of 512.

Change History (1)

comment:1 Changed 11 years ago by toy.raymond@…

Resolution: fixed
Status: newclosed

commit a1c04fe77fbea96b5c038547f64a6fff0089ed77 Author: Raymond Toy <toy.raymond@…> Date: Sat Mar 23 10:27:43 2013 -0700

Fix ticket:79

  • Initialize in-length to in-buffer-length, not 0.
  • Added a few more debugging prints.
Note: See TracTickets for help on using tickets.