I programmed a guestbook using PHP4 and HTML 4.01 (with the charset ISO-8859-15, i.e. latin-9). The data is saved in a MySQL-database with the charset (ISO-8859-1, i.e. lati
A web page that has a text input field should be UTF-8 encoded, because this is the only way to ensure that all characters entered by the user will be correctly transmitted. How you deal with them server-side (e.g., rejecting characters outside some specific range) is a different issue.
If you use some other encoding and the user enters a character that has no representation in that encoding, this is an error condition that browsers may handle in any way they like. Modern browsers do something that is very odd in principle though useful in practice: they represent the characters as character references, like ’ for the right single quote (’). In this case, the data received is the same as if the user had actually typed the characters ’ (but this is so theoretical that browser vendors apparently ignore the problem).
What happens server-side in your case is unclear, but it may involve many types of processing. In any case, you cannot in general store ISO-8859-15 in ISO-8859-1 encoding (ISO-8859-15 was designed to replace some characters in ISO-8859-1 by other characters). It is unclear what your software does with character references like ’. It would be slightly odd, though surely possible, for software to replace them by character references like (which are based on using windows-1252 as the document character set, contrary to HTML rules; they are technically undefined—not illegal—in HTML but so widely supported by browsers that HTML5 turns this to a rule).