in reply to XML encoding problem

I think your problems come from mixing encodings here. You should convert everything to utf-8 as early as possible in the process, and stick to it. Modern web browser should display the resulting HTML without any problem. Your terminal, if doesn't support utf-8 might not though. You should probably upgrade it if you can, otherwise you will have to live with seeing a few @ in your files. A utf-8-enabled editor would display everything properly.

You should convert static files to utf-8 (you can use iconv), and if possible database contents too. If you can't convert the db content, use Encode to convert the strings before using them.

This seems like a lot of work upfront, but I really believe it is worth it. Once it's done you will have a clean system to work with.