I need to store in a MySQL database table ASCII character codes like this for example (★⋰⋱★⋰⋱★⋰⋱★⋰⋱★)
Should I manipulate the data before saving to my db (using javascript)
in order to be stored as html codes (&heart;) or should I change the type the data is stored and MySQL will handle everything? (Utf-8)
I need to store in a MySQL database table ASCII character codes like this
Share
If your database field must be encoded in ASCII, I would definitely store those esoteric characters as say
&heart;as you said because ASCII certainly does not extend to those characters (ASCII uses only 7 bits to store character data).Nonetheless, I would recommend using UTF-8 for your database field. UTF-8 allows for a far wider range of characters.