I have recently seen a few URIs containing the query parameter “utf8=✓”. My first impression (after thinking “mmm, looks cool”) was that this could be used to detect a broken character encoding.
So, is this a better way to resolve potential problems with character encoding, or is it just a developer having fun with a hack?
4
By default, older versions of IE (<=8) will submit form data in Latin-1 encoding if possible. By including a character that can’t be expressed in Latin-1, IE is forced to use UTF-8 encoding for its form submissions, which simplifies various backend processes, for example database persistence.
If the parameter was instead utf8=true
then this wouldn’t trigger the UTF-8 encoding in these browsers.
14