HTML objects were introduced many years ago to transfer symbolic information through a wire when the transport was not binary, and for the case when the user agent (browser) did not support the encoding of the transport layer or server encoding.
Since the HTML object contains only very simple characters ( &
, ;
, az
and 0-9
), and these characters have the same binary encoding in most character sets, this was very safe from those side effects.
However, when you store something in the database, you do not have these problems because you are usually under control and know how and how you can store text in the database.
For example, if you enable Unicode for text inside a database, you can store all characters, none of them are special. Please note that you need to know your database here, there are some technical details that you may encounter. For example, you don’t know the encoding of the encoding for connecting to the database, so you cannot tell your database exactly what text you want to save there. But in general, you just save the text and retrieve it later. Nothing special to solve.
There are actually disadvantages when you use HTML objects instead of a simple character:
- HTML objects consume more space:
ü
much more than ü
in LATIN-1, UTF-8, UTF-16 or UTF-32. - HTML objects need further processing. They must be created, and when they are read, they must be disassembled. Imagine that you need to find specific text in your database, or any other actions will require additional processing. This is just overhead.
Real entertainment begins when you mix both concepts. You come to a place that you really do not want to enter. So just don’t do it because you don’t need it.
hakre source share