Forum OpenACS Development: Re: cr_write_content and utf-8

Collapse
Posted by Emmanuelle Raffenne on
Hi Brian,

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.

Collapse
Posted by Brian Fenton on
Thanks Emmanuelle for trying the test case. Yes I think I'll probably use file copy for the cases where we store files on the file system (I haven't tested yet if the code works on systems where we store files in the database) but I thought I'd see if anyone here has a fix for the problem.

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

thanks again
Brian