The issue is with consistency. You need to identify what charset is for all places where you handle your data:
- Data entry into Application?
- Data entry into the DB?
- Data query and display through the DB command line tool?
- Data retrieval and mixing with the template?
- Data output to to the browser?
In all these stages, a mistake/mixup can happen which will break the chain. To identify it, you will have to look at hexdumps of the data at various stages to see whether the data is (still) how you want it. Especially Templates are prone to encoding mixups in my experience.