Petr Konecny <pekon(a)ams.sunysb.edu> writes in xemacs-beta(a)xemacs.org:
...
I wonder what this is supposed to do:
xemacs -vanilla -eval '
(progn
(set-language-environment "Latin-2")
(with-temp-file "/tmp/apel-copy"
(insert-file-contents-internal "/tmp/apel-1.11-pkg.tar.gz"))
(save-buffers-kill-emacs))'
Read in the tar file and assume Latin-2[1] encoding?
For me the created file (/tmp/apel-copy) is bigger than the
original. Maybe insert-file-contents-internal is broken, because
with insert-file-contents-literally the copies are same.
insert-file-contents-internal is supposed to do encoding and
insert-file-contents-literally is not, so I think this behavior is
O.K.
Compare this:
$ xemacs -vanilla -eval '
(progn
(set-language-environment "Latin-2")
(with-temp-file "/tmp/apel-copy"
(set-buffer-file-coding-system (quote binary))
(insert-file-contents-internal "/tmp/apel.tar.gz"))
(save-buffers-kill-emacs))'
Footnotes:
[1] Whatever the default encoding of /tmp/apel-copy is supposed to be.