Keeping UTF-8 intact through an HTML application
An encoding declaration tells a browser how to interpret bytes. It does not convert those bytes. When an accented name becomes several unexpected characters, inspect the path from input to storage and back before changing declarations at random.
Check the bytes and the declaration
Save templates in the selected encoding and configure the server to send Content-Type: text/html; charset=UTF-8. An HTML 4 http-equiv Content-Type meta element can provide the corresponding declaration in the document. Keep these consistent. A conflicting HTTP header takes precedence over the document declaration, so inspect the response headers rather than relying only on View Source.
Follow a value through each boundary
Test a name containing an accent, a pound sign and a character outside the Western European set. Inspect what the form sends, what the application stores and what it reads back. Confirm what the installed database and client library support; do not assume that every byte string is automatically converted. Convert only at a boundary where the source encoding is known.
Keep escaping separate from conversion
HTML escaping protects markup characters such as ampersands and angle brackets. It does not repair text decoded using the wrong character set. Numeric character references can represent characters in HTML, but storing all text as such references complicates email, searching and other output. Retain original backups before converting existing records, and test for data already converted once.
Save, edit, search for and export the same test record. Correct display immediately after submission can hide a fault in the stored value.