What does the \\x1a
character mean and why does mysql_real_escape_string
escape it?
From the documentation:
mysql_real_e
It's a Unicode escape sequence, in hexadecimal (base 16). \x1a
is the "substitute" character.
See also: https://en.wikipedia.org/wiki/Substitute_character
Why does
mysql_real_escape_string
escape it?
According to the documentation,
Strictly speaking, MySQL requires only that backslash and the quote character used to quote the string in the query be escaped.
mysql_real_escape_string()
quotes the other characters to make them easier to read in log files.