Forum OpenACS Development: Re: cr_write_content and utf-8
I've run your testcase with word and pdf files and indeed files get corrupted, and it's not encoding related IMO. For example: the original word file was 140K and the copy was 154K. I didn't dig into it to understand why it happens.
As Dave said, I would suggest to use "file copy" or "fcopy" for your purpose, much easier.
For completeness, here are the settings on my system:
set ::env(LANG) in ds/shell returns en_IE.UTF-8
encoding system in ds/shell returns utf-8
encoding system in tclsh returns utf-8
locale on the OS returns LANG=en_IE.UTF-8
echo $NLS_LANG on the OS returns .UTF8